当我在更改默认启动活动后调试我的应用程序时,Eclipse说“找不到源”

时间:2013-10-19 18:45:50

标签: android eclipse

每当我更改AndroidManifest.xml文件中的默认活动时,都会出现调试错误并说:

'Thread [<1> main] (Suspended (exception RuntimeException)) 
<VM does not provide monitor information>   
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2249    
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2299 
ActivityThread.access$700(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 154    
ActivityThread$H.handleMessage(Message) line: 1284  
ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
Looper.loop() line: 137 
ActivityThread.main(String[]) line: 5306    
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
Method.invoke(Object, Object...) line: 511  
ZygoteInit$MethodAndArgsCaller.run() line: 1102 
ZygoteInit.main(String[]) line: 869 
NativeStart.main(String[]) line: not available [native method]  

Thread [<10> Binder_2] (Running)    
Thread [<9> Binder_1] (Running) '

然后在共享区域中,它显示“源未找到”,并显示“编辑源查找路径”按钮。我的Android Manifest看起来像这样

    '<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tobidae.problem"
android:versionCode="1"
android:versionName="1.0" >

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

<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=".MainMenu"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="com.tobidae.problem.MAINMENU" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
</application>   
</manifest>'

谢谢...

1 个答案:

答案 0 :(得分:0)

如果继续执行程序(在IDE上按“继续”),将抛出异常,您将能够在LogCat中读取它。 “未找到源”错误表示该异常是使用Android框架代码生成的,而不是在您的类中生成;这可能意味着它无法找到指定的活动(或无法实例化该类)并抛出异常。