android.content.ActivityNotFoundException:未找到可处理Intent的活动



我创建了一个名为MyBabyCanRead的新应用程序包裹名称为com.example.claudio.mybabycanread.

当我运行应用程序时,我在logcat中得到了他的错误,我不知道为什么:

   10-21 15:42:12.108    1305-1322/com.example.claudio.mybabycanread E/AndroidRuntime﹕ FATAL      EXCEPTION: Thread-165
      android.content.ActivityNotFoundException: No Activity found to handle Intent {  act=com.example.claudio.mybabycanread.MENU }
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
        at android.app.Activity.startActivityForResult(Activity.java:3190)
        at android.app.Activity.startActivity(Activity.java:3297)
        at com.example.claudio.mybabycanread.Splash$1.run(Splash.java:26)

我的清单是这样的:

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.claudio.mybabycanread" >
<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="20"/>
<application

    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
     >
    <activity
        android:name=".Splash"
        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:screenOrientation="portrait"
        android:name=".Menu"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MENU" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:screenOrientation="landscape"
        android:name=".Level1"
        android:label="Level 1">
        <intent-filter>
            <action android:name="com.example.claudio.mybabycanread.LEVEL1" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:screenOrientation="landscape"
        android:name=".Level1T"
        android:label="Level 1 Training">
        <intent-filter>
            <action android:name="com.example.claudio.mybabycanread.LEVEL1T" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

    <activity
        android:screenOrientation="landscape"
        android:name=".TextToSpeechTest"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="com.example.claudio.mybabycanread.TEXTTOSPEECHTEST" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
    android:screenOrientation="landscape"
    android:name=".VideoPlayer"
    android:label="@string/app_name" >
    <intent-filter>
        <action android:name="com.example.claudio.mybabycanread.VIDEOPLAYER" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
  </activity>
  </application>
 </manifest>

这是我的splash.java文件:

package com.example.claudio.mybabycanread;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
/**
* Created by Cl on 9/29/2014.
*/
public class Splash extends Activity {
MediaPlayer ourSong;
@Override
protected void onCreate(Bundle ClaudioFahmy) {
    super.onCreate(ClaudioFahmy);
    setContentView(R.layout.splash);
    ourSong = MediaPlayer.create(Splash.this, R.raw.splashsound);
    ourSong.start();
    Thread timer = new Thread(){
        public void run(){
            try{
                sleep(1000);
            } catch (InterruptedException e){
                   e.printStackTrace();
            }finally{
                Intent Level1 = new Intent("com.example.claudio.mybabycanread.MENU");
                startActivity(Level1);
            }
        }
    };
    timer.start();
}
@Override
protected void onPause() {
    super.onPause();
    ourSong.release();
    finish();
}
}

现在我正试图成为一个千里眼,但在您的Splash.java文件第26行下:您已经在该行启动了result的活动,而在intent构造函数中有一个错误的String:类似于。。

Intent intent = new Intent("com.example.claudio.maxcanreadattheageof1");
startActivityForResult(intent, 0);

请上传您的清单文件,错误也可能存在。。

确保您的清单文件包更新为package=com.example.claudio.mybabycanread

最新更新