我的任务是修改一个应用程序。我混淆了main中的错误。main 的错误在哪里?
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 main 是否仅在 OnCreate 中?我是安卓新手。如果不只是OnCreate,它会让我给出很长的源代码(因为完整的源代码很长所以我不能给出)。你能帮我解决我的问题吗?
我无法上传 logcat 错误图像,因为我的声誉还不到 10。