2012-09-30 53 views
1

我試圖找到解決方案,但它看起來對我的n00b眼睛,所以我完全失去了。我試過尋找其他問題,他們似乎都有不同的答案,所以他們根本沒有任何幫助。這是一些示例代碼,我試圖去工作,所以我爲這個奇怪的命名道歉。java.lang.RuntimeException並無法實例化

我得到這個錯誤

09-30 17:22:26.467: E/AndroidRuntime(273): FATAL EXCEPTION: main 
09-30 17:22:26.467: E/AndroidRuntime(273): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{test.test/test.test.test.splashScreen}: java.lang.ClassNotFoundException: test.test.test.splashScreen in loader dalvik.system.PathClassLoader[/data/app/test.test-1.apk] 

這是我的清單

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="test.test" android:versionCode="1" android:versionName="1.0"> 
<uses-sdk android:minSdkVersion="8" /> 

<application android:icon="@drawable/icon" android:label="@string/app_name"> 
    <activity android:name=".test.splashScreen" android:label="@string/app_name" 
     android:clearTaskOnLaunch="true"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <activity android:name=".test.Game" android:screenOrientation="landscape" android:theme="@style/Theme.NoBackground"/> 
    <activity android:name=".test.test" /> 
    <activity android:name=".test.TMXTiledMapExampleAStar" /> 
    <activity android:name=".test.Options" /> 
    <activity android:name=".test.MainMenu" /> 
</application> 
<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.WAKE_LOCK"/> 

這是濺射屏幕文件的開頭

package test.test.test; 

public class splashScreen extends BaseGameActivity { 
+0

退房XML文件.. –

+0

好了...我看着它。我在找什麼?我已經看過它,它看起來是正確的,所以我不知道導致這個問題的錯誤。 – Halollet

回答

2

第一, 給更多直觀的名字到你的軟件包! 我寧願評論,但我沒有足夠的代表。

2建議:

嘗試清潔您的項目

嘗試:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="test.test" android:versionCode="1" android:versionName="1.0"> 

<activity android:name=".splashScreen" android:label="@string/app_name" 
     android:clearTaskOnLaunch="true"> 
+0

是啊......那根本不起作用。我仍然遇到同樣的錯誤。我沒有看到你建議的有什麼不同。 – Halollet

相關問題