Android应用无法运行

TAM*_*TAM 0 java android

所以我试图运行这个应用程序,我用来了解线程和意图,但应用程序将无法运行,但我没有任何警告/错误下划线代码,任何人都可以帮助我.

清单代码:

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.learn.tam.Splash"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.SPLASH" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.example.learn.tam.StartingPoint"
        android:label="@string/app_name" >
    </activity>
 </application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

和活动代码

package com.example.learn.tam;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class Splash extends Activity{

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    setContentView(R.layout.splash);

    Thread timer = new Thread(){

        public void run(){
            try {
                sleep(5000);
            }
            catch (InterruptedException e){
                e.printStackTrace();
            }
            finally{
Intent openStartingPoint = new   Intent("com.example.learn.tam.StartingPoint"); 
startActivity(openStartingPoint);
            }
        }
    };

    timer.start();
}



}
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激

A--*_*--C 6

更改

<intent-filter>
            <action android:name="android.intent.action.SPLASH" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

<intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

由于您的应用可能未显示在主屏幕上(MAIN需要该类别).

而且也改变了

Intent openStartingPoint = new   Intent("com.example.learn.tam.StartingPoint"); 
startActivity(openStartingPoint);
Run Code Online (Sandbox Code Playgroud)

Intent openStartingPoint = new   Intent(Splash.this, StartingPoint.class ); 
startActivity(openStartingPoint);
Run Code Online (Sandbox Code Playgroud)

由于您的StartingPoint没有定义Intent-Action "com.example.learn.tam.StartingPoint"

看看是否有任何修复.