我一直在将这个应用程序上传到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].
以下是我的清单的相关部分:
<?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" />
清单也没有改变,除了android:versionCode,我在构建之前递增了。我的设备是三星Galaxy S III和Galaxy Note 8.0,分别运行Android 4.4.2和4.4.3。
答案 0 :(得分:0)
由于某些未知原因,问题就消失了。我不知道如何,但它不再发生,应用程序启动就好了。可能是一个奇怪的不可复制的Eclipse bug;发生这种情况时我讨厌它。