Android的Libgdx应用程序,未能解决AndroidApplication [英] Android Libgdx application, failed resolving AndroidApplication
问题描述
我卡在使用libgdx的Android项目。
我的桌面项目完美的作品。
我的Android项目包含含armeabi和armeabi-V7A和Android GDX后端libs文件夹。
活动是在清单中声明
I'm stuck on an android project using libgdx.
My desktop project works perfectly.
My android project contains the libs folder containing armeabi and armeabi-v7a and the android gdx backends.
Activity is declared in manifest
我已经习惯了使用这些工具。 一切曾经工作完美,所有的突然,我面临的一个持续性错误(项目固定后,清洗,重新启动,重新下载该库,尝试不同的API,SDK水平,JDK ...)。
I'm used to using these tools. Everything used to work perfectly and all the sudden I am facing a persistent error (after project fixing, cleaning, restarting, redownloading the libs, trying different api, sdk levels, jdk...).
下面是错误的登录
06-05 03:28:38.953: I/dalvikvm(5312): Failed resolving
Lcom/badlogic/gdx/backends/android/AndroidApplication; interface 73 'Lcom/badlogic/gdx/Application;'
06-05 03:28:38.963: W/dalvikvm(5312): Link of class 'Lcom/badlogic/gdx/backends/android/AndroidApplication;' failed
06-05 03:28:38.963: W/dalvikvm(5312): Unable to resolve superclass of Lcom/me/example/Example_RLActivity; (94)
06-05 03:28:38.963: W/dalvikvm(5312): Link of class 'Lcom/me/example/Example_RLActivity;' failed
06-05 03:28:38.963: D/AndroidRuntime(5312): Shutting down VM
06-05 03:28:38.963: W/dalvikvm(5312): threadid=1: thread exiting with uncaught exception (group=0x409fb338)
06-05 03:28:38.963: E/AndroidRuntime(5312): FATAL EXCEPTION: main
06-05 03:28:38.963: E/AndroidRuntime(5312): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.me.example/com.me.example.Example_RLActivity}: java.lang.ClassNotFoundException: com.me.example.Example_RLActivity
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.access$600(ActivityThread.java:123)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.os.Handler.dispatchMessage(Handler.java:99)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.os.Looper.loop(Looper.java:137)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.main(ActivityThread.java:4424)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.reflect.Method.invokeNative(Native Method)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.reflect.Method.invoke(Method.java:511)
06-05 03:28:38.963: E/AndroidRuntime(5312): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
06-05 03:28:38.963: E/AndroidRuntime(5312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
06-05 03:28:38.963: E/AndroidRuntime(5312): at dalvik.system.NativeStart.main(Native Method)
06-05 03:28:38.963: E/AndroidRuntime(5312): Caused by: java.lang.ClassNotFoundException: com.me.example.Example_RLActivity
06-05 03:28:38.963: E/AndroidRuntime(5312): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-05 03:28:38.963: E/AndroidRuntime(5312): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
06-05 03:28:38.963: E/AndroidRuntime(5312): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
06-05 03:28:38.963: E/AndroidRuntime(5312): ... 11 more
我希望你们当中有些人可能会面临的问题,并解决它! 在此先感谢您的帮助
I hope some of you might have faced the problem and solved it! Thanks in advance for your help
推荐答案
听起来像Android的R17的升级问题。见badlogic博客的解决方法:<一href="http://www.badlogicgames.com/word$p$pss/?p=2362">http://www.badlogicgames.com/word$p$pss/?p=2362
Sounds like the Android r17 upgrade bug. See the badlogic blog for the work-around: http://www.badlogicgames.com/wordpress/?p=2362
基本上,你需要明确标记的libGDX jar文件从Android项目出口罐子。
Basically, you need to explicitly tag the libGDX jar files as "exported" jars from the Android project.
这篇关于Android的Libgdx应用程序,未能解决AndroidApplication的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!