我创建的 android 游戏 apk 已成功安装在其上,但它运行不佳,它给了一个小狗,其中说强制关闭应用程序:
我的logcat如下:
07-17 01:02:25.780: D/AndroidRuntime(583): Shutting down VM
07-17 01:02:25.780: W/dalvikvm(583): threadid=1: thread exiting with uncaught exception (group=0x40015560)
07-17 01:02:25.811: E/AndroidRuntime(583): FATAL EXCEPTION: main
07-17 01:02:25.811: E/AndroidRuntime(583): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.jamescho.androidgame/com.jamescho.androidgame.SampleGame}: java.lang.ClassNotFoundException: com.jamescho.androidgame.SampleGame in loader dalvik.system.PathClassLoader[/data/app/com.jamescho.androidgame-2.apk]
07-17 01:02:25.811: E/AndroidRuntime(583): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1544)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.os.Handler.dispatchMessage(Handler.java:99)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.os.Looper.loop(Looper.java:123)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.app.ActivityThread.main(ActivityThread.java:3647)
07-17 01:02:25.811: E/AndroidRuntime(583): at java.lang.reflect.Method.invokeNative(Native Method)
07-17 01:02:25.811: E/AndroidRuntime(583): at java.lang.reflect.Method.invoke(Method.java:507)
07-17 01:02:25.811: E/AndroidRuntime(583): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-17 01:02:25.811: E/AndroidRuntime(583): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-17 01:02:25.811: E/AndroidRuntime(583): at dalvik.system.NativeStart.main(Native Method)
07-17 01:02:25.811: E/AndroidRuntime(583): Caused by: java.lang.ClassNotFoundException: com.jamescho.androidgame.SampleGame in loader dalvik.system.PathClassLoader[/data/app/com.jamescho.androidgame-2.apk]
07-17 01:02:25.811: E/AndroidRuntime(583): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
07-17 01:02:25.811: E/AndroidRuntime(583): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
07-17 01:02:25.811: E/AndroidRuntime(583): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-17 01:02:25.811: E/AndroidRuntime(583): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1536)
07-17 01:02:25.811: E/AndroidRuntime(583): ... 11 more
主要文件
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jamescho.androidgame"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:icon="@drawable/icon"
android:label="RobotGame" >
<activity
android:name=".SampleGame"
android:configChanges="keyboard|keyboardHidden|orientation"
android:label="RobotGame"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
请帮我解决它显示同样的问题
感谢您的回复,但它不起作用....