5.15 安卓加载application错误 Unable to instantiate application的android.test.runner.jar

sm-n9100出现这个bug:

05-15 17:42:49.716: E/AndroidRuntime(11797): FATAL EXCEPTION: main
05-15 17:42:49.716: E/AndroidRuntime(11797): Process: com.<packge>, PID: 11797
05-15 17:42:49.716: E/AndroidRuntime(11797): java.lang.RuntimeException: Unable to instantiate application com.<packge>.<MY>Application: java.lang.ClassNotFoundException: Didn't find class "com.<packge>.<MY>Application" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.<packge>-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.<packge>-1, /vendor/lib, /system/lib]]
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.app.LoadedApk.makeApplication(LoadedApk.java:507)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4862)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.app.ActivityThread.access$1600(ActivityThread.java:174)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1385)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.os.Handler.dispatchMessage(Handler.java:102)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.os.Looper.loop(Looper.java:146)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.app.ActivityThread.main(ActivityThread.java:5752)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at java.lang.reflect.Method.invokeNative(Native Method)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at java.lang.reflect.Method.invoke(Method.java:515)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at dalvik.system.NativeStart.main(Native Method)
05-15 17:42:49.716: E/AndroidRuntime(11797): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.<packge>.<MY>Application" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.<packge>-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.<packge>-1, /vendor/lib, /system/lib]]
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.app.Instrumentation.newApplication(Instrumentation.java:981)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	at android.app.LoadedApk.makeApplication(LoadedApk.java:502)
05-15 17:42:49.716: E/AndroidRuntime(11797): 	... 11 more
05-15 17:42:49.716: W/ActivityManager(994):   Force finishing activity com.<packge>/.MainActivity

出现

android.test.runner.jar
尝试删除测试支持:

<!-- 安卓单元测试支持 -->

        <!-- <uses-library android:name="android.test.runner" />  -->

        

    </application>


    <!-- 安卓单元测试支持 -->

     <!-- <instrumentation

        android:name="android.test.InstrumentationTestRunner"

        android:label="my android test"

        android:targetPackage="com.yunxunzh.wlyxh100" >

    </instrumentation> -->


重新运行,发现可以正常使用了,三星机内的系统已经没有runner测试支持了~




你可能感兴趣的:(android)