0
我建立一个Twitter客户端,当它打开它强行关闭和logat显示的OnCreate异常()方法,构造推特(字符串,字符串)已被弃用
这里有什么问题
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// find views by id
buttonUpdate = (Button) findViewById(R.id.buttonUpdate);
textStatus = (EditText) findViewById(R.id.textStatus);
// Add listener
buttonUpdate.setOnClickListener(this);
//Initialize twitter
prefs = PreferenceManager.getDefaultSharedPreferences(this);
String username = prefs.getString("username", "n/a");
String password = prefs.getString("password", "n/a");
if (username != null && password != null){
twitter = new Twitter(username, password);
}
}
,我认为它是在这里在这一行
twitter = new Twitter(username, password);
它在内衬和表演“的构造推特(字符串,字符串)已被弃用”
这是什么意思?
这意味着它不是现在使用的或可用的一些新的方法相同 – user3283976