cocos2dx android启动错误

前端之家收集整理的这篇文章主要介绍了cocos2dx android启动错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

错误

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.zjdzssbd.s360/com.zjdzssbd.s360.XXkapai}: java.lang.ClassNotFoundException: com.zjdzssbd.s360.XXkapai
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
at android.app.ActivityThread.access$600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:592)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.zjdzssbd.s360.XXkapai
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1025)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
... 11 more

原因:

无法引动Unable to instantiate activity ,原因是 没有找到相应的类。

解决

原来是我的AndroidManifest.xml中配置activity是名称配置错了,修改即可。

<activity
android:name="com.zjdzssbd.s360.XXkapai" -- 错了 android:configChanges="orientation|screenSize|smallestScreenSize" android:label="@string/app_name" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>

猜你在找的Cocos2d-x相关文章