所以基本上,我一直在做一个游戏使用libgdx,只是最近我开始尝试并添加谷歌玩游戏服务,所以我想我的手在它,它好像我已经完全搞砸了我的的.xml
文件我已经试过看着如How我解决这个未发现的Java类的异常?和NoClassDefFoundError - Eclipse和Android的,但都无济于事。
So essentially I've been making a game using libgdx and just recently I started to try and add Google Play Game Services and So I tried my hand at it and it seems as though I have completely messed up my .xml
file I've tried looking at questions such as How do I resolve this Java Class not found exception? and NoClassDefFoundError - Eclipse and Android, but to no avail.
下面是运行时错误,我recieving。
Here is the runtime error I am recieving.
02-19 19:25:17.772: E/AndroidRuntime(25746): FATAL EXCEPTION: main
02-19 19:25:17.772: E/AndroidRuntime(25746): Process: com.coppercow.minerman, PID: 25746
02-19 19:25:17.772: E/AndroidRuntime(25746): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.coppercow.minerman/com.coppercow.minerman.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.coppercow.minerman.MainActivity" on path: DexPathList[[zip file "/data/app/com.coppercow.minerman-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.coppercow.minerman-2, /vendor/lib, /system/lib]]
类名是MainActivity.Java,它是在src文件。据我所知,这样做是因为两件事:我的的.class
文件或的.xml
文件。所以这里也是我的的.xml
文件,以防万一我做错了是存在的,而不是实际上在任何的.class
文件。
The class Name is MainActivity.Java and it is in the src file. I understand that this is done because of one of two things: My .class
file, or the .xml
file. So here is also my .xml
file just in case what I have done wrong is there and not in fact in any .class
file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coppercow.minerman"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
不过,我已经与这个xml文件乱七八糟周围相当多,所以我不相信它是在这里,而我的整个问题,就必须在某些的.class
文件的地方,但我甚至不知道如何从去离这里问关于StackOverflow的其他问题访问那些蚀。
However I've messed around with this xml file quite a lot and so I do not believe it is in here and that My whole problem has to be in some .class
file somewhere, but I don't even understand how to access those from eclipse from going off of other questions asked here on StackOverflow.
推荐答案
试试这个:
转到项目/属性/ Java构建路径/订单和出口 - 确保有一个在Android的依赖关系的正面和支持库进行检查,如果你使用it.Mark所有的复选框,然后点击Apply(应用)和清洁项目。
Go to Project/Properties/Java Build Path/Order and Export -- Make sure there's a check in front of Android Dependencies and the support library, if you use it.Mark all checkboxes and Click on Apply and clean the project.
希望这有助于。
相关推荐
最新文章