2013-10-19 107 views
0

每當我改變我的AndroidManifest.xml文件默認的活動後調試我的應用程序,調試錯誤出現,並說:Eclipse中說,「源未找到」當我更改默認啓動活動

'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清單看起來像這樣

'<?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>' 

謝謝...

回答

0

如果你繼續你的程序(按上你的IDE「繼續」)中,將引發異常,你將能夠閱讀在LogCat中。 「未找到源」錯誤意味着該異常是由Android框架代碼生成的,而不是在您的類中生成的;這可能意味着它無法找到指定的活動(或不能實例化類)並拋出異常。