App runs on API-7 emulator, but not the API-8 emulator
My app runs fine using the Android2.1 API-7 emulator, but it will not run on a DroidX 2.2.1 device, nor a Google_API-8 emulator. Has something changed from API-7 to API-8 that makes my program upward incompatible? This is my logcat error:
02-28 17:23:57.911: DEBUG/AndroidRuntime(15353): Shutting down VM
02-28 17:23:57.911: WARN/dalvikvm(15353): threadid=1: thread exiting with uncaught exception (group=0x400208b0)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): FATAL EXCEPTION: main
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): java.lang.RuntimeException: Unable to instantiate application com.concbeam3.ConcBeam3: java.lang.ClassNotFoundException: com.concbeam3.ConcBeam3 in loader dalvik.system.PathClassLoader[/data/app/com.concbeam3-2.apk]
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:661)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4306)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.app.ActivityThread.access$3200(ActivityThread.java:129)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2145)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.os.Handler.dispatchMessage(Handler.java:99) 02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.os.Looper.loop(Looper.java:143)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at 开发者_JS百科android.app.ActivityThread.main(ActivityThread.java:4701)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at java.lang.reflect.Method.invokeNative(Native Method)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at java.lang.reflect.Method.invoke(Method.java:521)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at dalvik.system.NativeStart.main(Native Method)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): Caused by: java.lang.ClassNotFoundException: com.concbeam3.ConcBeam3 in loader dalvik.system.PathClassLoader[/data/app/com.concbeam3-2.apk]
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.app.Instrumentation.newApplication(Instrumentation.java:942)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:656)
02-28 17:23:57.969: ERROR/AndroidRuntime(15353): ... 11 more 02-28 17:23:57.992: WARN/ActivityManager(17919): Force finishing activity com.concbeam3/.Main
the manifest.xml reads:
<?xml version="1.0" encoding="UTF-8"?> <manifest package="com.concbeam3" xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName='"1.4"'> <application android:label="@string/app_name" android:debuggable="true" android:icon="@drawable/ic_launcher_concrete" android:name="@string/app_name"> <activity android:label="@string/app_name" android:name=".Main" android:configChanges="keyboardHidden|orientation" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name=".Help"/> <activity android:name=".About"/> <activity android:name=".Preferences" android:label="@string/app_name"/> </application> <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"/> </manifest>
I started a new app with a different name and copied all of the files and code into the new app and it ruins on API-7 and API-8. I guess that there was a corruption in the file systems or with the signing. So... the solution was to start a fress app.
精彩评论