作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已将此应用多次上传到 Google Play,均未出现问题。我没有更改任何构建文件(我使用的是 Eclipse),如果我从 IDE 安装它,它运行良好。然而,在我对 Google Play 进行最新更新后,当我尝试从那里安装它时(我必须先从设备上卸载它;不同证书签名存在某种问题),它立即崩溃:
java.lang.RuntimeException: Unable to instantiate application com.chiaramail.chiaramailforandroid.K9: java.lang.ClassNotFoundException: Didn't find class "com.chiaramail.chiaramailforandroid.K9" on path: DexPathList[[zip file "/data/app/com.chiaramail.chiaramailforandroid-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.chiaramail.chiaramailforandroid-1, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4588)
at android.app.ActivityThread.access$1600(ActivityThread.java:169)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5487)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.chiaramail.chiaramailforandroid.K9" on path: DexPathList[[zip file "/data/app/com.chiaramail.chiaramailforandroid-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.chiaramail.chiaramailforandroid-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:981)
at android.app.LoadedApk.makeApplication(LoadedApk.java:511)
... 11 more
我检查了 Stack Overflow 上针对相同问题的所有答案,但都没有帮助。我对此束手无策,也许最糟糕的是,我什至无法取消 Google Play 上的更新,因为当我尝试时,出现错误:
This configuration cannot be published for the following reason(s):
It is forbidden to downgrade devices which previously matched version 4059 to version 4055, which would occur when
API levels in range 13+ and
Release track excluding all of [BETA] and
Screen layouts containing any of [small, normal, large, xlarge].
这是我的 list 的相关部分:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.chiaramail.chiaramailforandroid"
android:versionCode="4062"
android:versionName="4.33" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="20"
/>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="com.android.vending.BILLING" />
<!-- Needed to mark a contact as contacted -->
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="org.thialfihar.android.apg.permission.READ_KEY_DETAILS" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<permission
android:name="com.chiaramail.chiaramailforandroid.permission.READ_ATTACHMENT"
android:description="@string/read_attachment_desc"
android:label="@string/read_attachment_label"
android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="dangerous" />
<uses-permission android:name="com.chiaramail.chiaramailforandroid.permission.READ_ATTACHMENT" />
<permission
android:name="com.chiaramail.chiaramailforandroid.permission.REMOTE_CONTROL"
android:description="@string/remote_control_desc"
android:label="@string/remote_control_label"
android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="dangerous" />
<uses-permission android:name="com.chiaramail.chiaramailforandroid.permission.REMOTE_CONTROL" />
<permission
android:name="com.chiaramail.chiaramailforandroid.permission.READ_MESSAGES"
android:description="@string/read_messages_desc"
android:label="@string/read_messages_label"
android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="dangerous" />
<uses-permission android:name="com.chiaramail.chiaramailforandroid.permission.READ_MESSAGES" />
<permission
android:name="com.chiaramail.chiaramailforandroid.permission.DELETE_MESSAGES"
android:description="@string/delete_messages_desc"
android:label="@string/delete_messages_label"
android:permissionGroup="android.permission-group.MESSAGES"
android:protectionLevel="dangerous" />
<uses-permission android:name="com.chiaramail.chiaramailforandroid.permission.DELETE_MESSAGES" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<!-- android:hardwareAccelerated attribute workaround for Android bug in WebView -->
<application
android:name="com.chiaramail.chiaramailforandroid.K9"
android:hardwareAccelerated="true"
android:allowTaskReparenting="false"
android:icon="@drawable/chiaramail_icon_red"
android:label="@string/app_name"
android:theme="@style/Theme.K9.Light" >
<meta-data
android:name="android.app.default_searchable"
android:value="com.chiaramail.chiaramailforandroid.activity.Search" />
list 也没有改变,除了 android:versionCode,我在构建之前递增了它。我的设备是 Samsung Galaxy S III 和 Galaxy Note 8.0,分别运行 Android 4.4.2 和 4.4.3。
最佳答案
由于某些未知原因,问题刚刚消失。我不知道如何,但它不再发生并且应用程序启动正常。可能是一个奇怪的不可重现的 Eclipse 错误;我讨厌发生这种情况。
关于java.lang.RuntimeException : Unable to instantiate application com. chiaramail.chiaramailforandroid.K9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25255433/
我已将此应用多次上传到 Google Play,均未出现问题。我没有更改任何构建文件(我使用的是 Eclipse),如果我从 IDE 安装它,它运行良好。然而,在我对 Google Play 进行最新
我是一名优秀的程序员,十分优秀!