Android 应用程序进程意外停止

Android 应用程序进程意外停止,android,Android,我是android新手,所以我不知道如何解释这个日志。我在这个网站上搜索了一下,但没有找到任何解决我所面临问题的方法。希望能得到一些帮助。提前谢谢。 安卓清单 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.splashscreen" android:ve

我是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>
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();
}

}Splash.java中的更改

     Intent("com.splashscreen.MENU");
改为

     Intent("com.splashscreen.Menu");

在com.splashscreen包文件夹中创建活动菜单作为类名 比如说

public class Menu extends Activity{ }
然后调用计时器代码finally块中的以下代码

Intent mIntent = new Intent(StartingPoint.this,com.splashscreen.Menu.class);
startActivity(mIntent);

这将解决您的问题。

请发布您的
AndroidManifest.xml
以及导致此异常的代码。在com.splashscreen.Splash$1.run(Splas h.java:31)第31行有错误发布您的启动活动代码。第31行是startActivity(openStartingPoint);我已经检查过了,确认没有错误,您必须更改意图(“com.splashscreen.MENU”);它必须工作。在这个问题之后你可能会有另一个问题。logCat显示另一件事或上面发布的相同内容。?logCat与以前一样。你的src_splashscreen文件夹中有
菜单.java
吗?是的,我有Splash.java,我的src folderi中的StartingPoint.java和menu.java我想使用Class的方法forName来实现这一点,其次,如果我使用StartingPoint,这在类菜单中毫无意义,因为“StartingPoint.this”不会指向菜单类请参阅此文档以启动活动
Intent mIntent = new Intent(StartingPoint.this,com.splashscreen.Menu.class);
startActivity(mIntent);