2012-09-30 44 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

相关问题