我目前在市場上有一個簡單的應用程序,現在我試着在Android 4.0設備上安裝它。 但在我的Splashscreen關閉後失敗。我送的關係,並得到這個反饋:我的應用程序Splashscreen失敗的Android 4.0冰淇淋三明治
Crash
java.lang.UnsupportedOperationException
Thread.stop()
和
java.lang.UnsupportedOperationException
at java.lang.Thread.stop(Thread.java:1076)
at java.lang.Thread.stop(Thread.java:1063)
at com.lars.PSVWebView.SplashScreen$1.run(SplashScreen.java:35)
這是代碼,自去年編輯:
package com.lars.DrinkRecOrder;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
public class SplashScreen extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
Intent intent = new Intent();
intent.setClass(SplashScreen.this, DrinkRecOrderActivity.class);
}{
/* start the activity */
startActivity(new Intent("com.lars.DrinkRecorder.splashscreen.DrinkRecorderActivity"));
}
}, 500);
}
}
所以這是我的新代碼...沒有錯誤,但也不起作用,我的應用程序在啓動時崩潰。 順便說一句...相同的splashscreen代碼,不同的應用程序
此外,絕對沒有理由在此時停止它。當執行從run()方法離開時,線程停止而不顯式停止它。 – harism 2012-02-04 17:29:42