我的任务是修改一个应用程序。我混淆了主要的错误。 主要错误在哪里?
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ConfigurationBuilder cb = new ConfigurationBuilder();
String consumerkey = "A";
String consumersecret = "A";
String token = "S";
String tokensecret = "D";
String nonce = "Vf";
String signature = "D";
String signaturemethod = "HMAC-SHA1";
String timestamp = "2";
{
cb.setDebugEnabled(true)
.setOAuthConsumerKey(consumerkey)
.setOAuthConsumerSecret(consumersecret)
.setOAuthAccessToken(token)
.setOAuthAccessTokenSecret(tokensecret);
}
//TwitterFactory tf = new TwitterFactory(cb.build());
//Twitter twitter = tf.getInstance();
// The factory instance is re-useable and thread safe.
//insert the appropriate consumer key and consumer secret here
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.activity_main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.window_title);
setContentView(R.layout.activity_main);
pager = (ViewPager) MainActivity.this.findViewById(R.id.viewpager);
imageView = (ImageView) findViewById(R.id.header);
nameTextView = (TextView) findViewById(R.id.title_name);
descTextView = (TextView) findViewById(R.id.description);
pageDescription = (TextView) findViewById(R.id.pageDescription);
pageDescription.setText("Timeline");
// Initialize the pager
adView = (AdView)findViewById(R.id.adView);
adView.loadAd(new AdRequest());
this.initialisePagingTimeline();
}
Android主要仅在OnCreate中?我是android的新手。如果不仅仅是OnCreate,它会让我给出很长的源代码(因为完整的源代码很长,所以我不能给出)。你能帮我解决我的问题吗?
我无法上传logcat错误图片,因为我的声誉仍在十岁以下。