[英]application process stops unexpectedly
I m new to android so i don't know how to interpret this logcat i searched this site but not found any solution to what im facing.a little help will be appriciated.thank you in advance. 我是android的新手,所以我不知道该如何解释这个logcat,我在此网站上进行了搜索,但未找到针对我所面临问题的任何解决方案。需要一点帮助。请提前感谢您。 Android manifest
Android清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.splashscreen"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8
/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<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:name="com.splashscreen.StartingPoint"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.splashscreen.STARTINGPOINT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.splashscreen.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>
</application>
Log cat :
02-21 17:24:21.026: W/dalvikvm(447): threadid=9: thread exiting with uncaught exception (group=0x40015560)
02-21 17:24:21.026: E/AndroidRuntime(447): FATAL EXCEPTION: Thread-10 02-21 17:24:21.026: E/AndroidRuntime(447): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.splashscreen.MENU } 02-21 17:24:21.026:E/AndroidRuntime(447): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
02-21 17:24:21.026: E/AndroidRuntime(447): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
02-21 17:24:21.026: E/AndroidRuntime(447): at android.app.Activity.startActivityForResult(Activity.java:2827)
02-21 17:24:21.026: E/AndroidRuntime(447): at android.app.Activity.startActivity(Activity.java:2933)
02-21 17:24:21.026: E/AndroidRuntime(447): at com.splashscreen.Splash$1.run(Splash.java:31)
Splash.java Splash.java
package com.splashscreen;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
public class Splash extends Activity {
MediaPlayer ourSong;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
ourSong = MediaPlayer.create(Splash.this, R.raw.splashsound);
ourSong.start();
Thread timer = new Thread(){
public void run(){
try{
sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}finally{
Intent openStartingPoint = new Intent("com.splashscreen.MENU");
startActivity(openStartingPoint);
}
}
};
timer.start();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
ourSong.release();
finish();
}
} }
Change in Splash.java
Splash.java
更改
Intent("com.splashscreen.MENU");
Change to 改成
Intent("com.splashscreen.Menu");
Create a Activity Menu as the class name in com.splashscreen package folder for example 例如,在com.splashscreen软件包文件夹中,创建一个活动菜单作为类名。
public class Menu extends Activity{ }
Then call the below code in the timer code finally block 然后在定时器代码中最终块中调用以下代码
Intent mIntent = new Intent(StartingPoint.this,com.splashscreen.Menu.class);
startActivity(mIntent);
This will solve your problem. 这样可以解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.