我正在使用Android 2.2开发一个Android应用程序,我的应用程序APK大小是22.5 MB,我想为三星平板电脑创建一个新的构建。我得到了以下错误:

INSTALL_FAILED_DEXOPT

如何解决这种错误?


当前回答

如果你使用Android Studio,尝试清理你的项目:

建立>清洁项目

其他回答

对我来说,这是proguard导致INSTALL_FAILED_DEXOPT在一些三星设备与Android 5.x。

也就是说,我必须添加这个来保护-不知道为什么它有帮助。

-keepattributes LocalVariableTable

从Android SDK和AVD管理器重新启动模拟器,并选择选项擦除用户数据已经为我解决了这个问题。

你可以在下图中找到高亮显示的选项:

targetSdkVersion 22//17==========================>设置这个数字小于或等于设备上的Android操作系统版本可能会有帮助

 defaultConfig {
        applicationId "software.nhut.personalutilitiesforlife"
        minSdkVersion 16
        targetSdkVersion 22//17==========================> set this number less then or equal to the version of Android OS on devices might help
        versionCode 5
        versionName "1.26"
        // Enabling multidex support.
        multiDexEnabled true
    }

此外,如果您还在使用ECLIPSE,请尝试清理您的项目:

项目>清洁…

您正在安装的应用程序的旧版本有已更改的依赖库/ jar。我在更新我的应用程序引用的其他jar文件时遇到了这个问题。

你将需要卸载旧版本,然后你应该没有更多的问题…

设置—>应用程序—>管理应用程序—>[找到并卸载您的应用程序]

INSTALL_FAILED_DEXOPT错误不应该爆发。就像

[2011-06-14 01:23:40 - ProtectYourself] Installing ProtectYourself.apk...
[2011-06-14 01:24:26 - ProtectYourself] Installation error: INSTALL_FAILED_DEXOPT
[2011-06-14 01:24:26 - ProtectYourself] Please check logcat output for more details.
[2011-06-14 01:24:26 - ProtectYourself] Launch canceled!

呜。