Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/188.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 韩元';无法连接到下一个活动_Android_Android Activity - Fatal编程技术网

Android 韩元';无法连接到下一个活动

Android 韩元';无法连接到下一个活动,android,android-activity,Android,Android Activity,因此,我有一个应用程序,希望连接到activitys,但由于某些原因,它无法连接,并且一直崩溃 Thread logotimer = new Thread(){ public void run(){ try{ sleep(1500); Intent logoLessius = new Intent("com.theludus.Mainpage"); startA

因此,我有一个应用程序,希望连接到activitys,但由于某些原因,它无法连接,并且一直崩溃

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>
改变

<activity
        android:name="com.theludus.Mainpage"
        android:label="@string/title_activity_mainpage" >
</activity>

在Logcat中崩溃告诉了你什么?我更喜欢用这种方式调用Activity Intent logoLessius=new Intent(Startup.this,Mainpage.Class);
<activity
        android:name="com.theludus.Mainpage"
        android:label="@string/title_activity_mainpage" >
</activity>
<activity
        android:name="com.theludus.Mainpage"
        android:label="@string/title_activity_mainpage" >
        <intent-filter>
            <action android:name="com.theludus.Mainpage" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
</activity>
Intent intent = new Intent(getApplicationContext(),ActivityName.class);
startActivity(intent);