0
所以我有一個應用程序,並希望連接到activitys但由於某種原因,將無法連接,它崩潰將無法連接到下一個活動的Android
Thread logotimer = new Thread(){
public void run(){
try{
sleep(1500);
Intent logoLessius = new Intent("com.theludus.Mainpage");
startActivity(logoLessius);
}
catch(InterruptedException e){
e.printStackTrace();
}
finally{
finish();
}
}
};
logotimer.start();
這是代碼必須在所有時間連接下一個頁面,接下來是我的Android清單
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity
android:name="com.theludus.Startup"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.theludus.Mainpage"
android:label="@string/title_activity_mainpage" >
</activity>
<activity
android:name="com.theludus.NewGame"
android:label="@string/title_activity_new_game" >
</activity>
<activity
android:name="com.theludus.GamePage"
android:label="@string/title_activity_game_page" >
</activity>
</application>
這就是我的logcat說
05-12 15:22:05.393: E/AndroidRuntime(26537): FATAL EXCEPTION: Thread-2649
05-12 15:22:05.393: E/AndroidRuntime(26537): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.Mainpage }
05-12 15:22:05.393: E/AndroidRuntime(26537): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
05-12 15:22:05.393: E/AndroidRuntime(26537): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
05-12 15:22:05.393: E/AndroidRuntime(26537): at android.app.Activity.startActivityForResult(Activity.java:3190)
05-12 15:22:05.393: E/AndroidRuntime(26537): at android.app.Activity.startActivity(Activity.java:3297)
05-12 15:22:05.393: E/AndroidRuntime(26537): at com.theludus.Startup$1.run(Startup.java:21)
崩潰在Logcat中告訴你什麼? – Luksprog 2013-05-12 13:32:26
添加我的logcat – stevedc 2013-05-12 13:35:37
我更喜歡用這種方式來打電話活動 Intent logoLessius = new Intent(Startup.this,Mainpage.Class); – 2013-05-12 13:38:21