gpt4 book ai didi

android - java.lang.RuntimeException 无法实例化

转载 作者:行者123 更新时间:2023-11-29 21:58:12 26 4
gpt4 key购买 nike

我试图找到解决这个问题的方法,但在我的 n00b 眼中它看起来很正确,所以我完全迷路了。我试过寻找其他问题,但他们似乎都有不同的答案,所以他们根本没有帮助。这是我正在努力工作的一些示例代码,因此对于奇怪的命名我深表歉意。

我遇到了这个错误

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]

这是我的 list

<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"/>

这是splashScreen文件的开头

package test.test.test;

public class splashScreen extends BaseGameActivity {

最佳答案

首先,给你的包起更直观的名字!我更愿意发表评论,但我没有足够的代表。

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">

关于android - java.lang.RuntimeException 无法实例化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12666105/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com