未能安装APK [INSTALL_FAILED_DEXOPT] Android的工作室 [英] Failure to install APK [INSTALL_FAILED_DEXOPT] Android Studio

查看:491
本文介绍了未能安装APK [INSTALL_FAILED_DEXOPT] Android的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了所有的一切尝试部署一个应用程序来进行调试实际的Andr​​oid设备,但一​​直未能解决的事时,试图纠正这个错误。每次我尝试推出我得到一个失败[INSTALL_FAILED_DEXOPT]错误,并检查logcat的时候总是因为我的调试APK没有classes.dex。

I have tried literally everything to try and rectify this error when trying to deploy an app to an actual android device for debugging but have been unable to solve the matter. Everytime I try to launch I get a failed [INSTALL_FAILED_DEXOPT] error and when checking the logcat it is always because there is no classes.dex in my debug apk.

如果我跑gradlew.bat干净assembleDebug,有在APK大小,所以我假设有在Android Studio中生成错误没有区别。我使用Android的工作室测试0.86,并具有相同的结果试图在0.89。我曾尝试构建工具为19.1至21没有结果。我也曾尝试不同的设备和创建一个新的项目(即从未安装在我的设备)和Android工作室似乎认为它需要尝试部署时,必须先卸载。

If I run gradlew.bat clean assembleDebug, there is no difference in the apk size so I'm assuming there is a build error in android studio. I am using android studio beta 0.86 and have tried it on 0.89 with the same result. I have tried build tools for 19.1 to 21 with no result. I have also tried different devices and created a new project (that has never been installed on my devices) and android studio seems to think it needs to be uninstalled first when attempting to deploy.

我已经尽了设备切换到ART,卸载并重新安装Android的工作室,重新下载SDK和重新启动我的电脑。不信邪,我的意思是没有奏效。我认为这个问题开始后,我下载了棒棒糖API,但我不知道。我试图卸载我的设备但没有任何工程与我的包签名所有的应用程序!甚至没有项目 - >清理项目 - >重建

I have tried switching my device to ART, uninstalling and reinstalling android studio, redownloading the sdk and restarting my computer. NOTHING and I mean NOTHING has worked. I think the problem started after I downloaded the lollipop apis but am not sure. I have tried uninstalling all apps with my package signature on my device but NOTHING works! Not even Project -> Clean Project -> Rebuild

这是非常令人沮丧,因为我不能调试我的应用程序了:/有没有人有这个错误或方法来纠正它的经验吗?

This is extremely frustrating as I cannot debug my apps anymore :/ has anyone had any experience with this error or ways to rectify it?

推荐答案

所以,事实证明,问题是不匹配的Andr​​oid Studio和项目之间的SDK。该项目使用的是旧的SDK有一次我让他们一样,我清理和重建项目,一切都很好走。

So turns out that the issue was mismatching sdks between Android Studio and the Project. The project was using an old sdk and once I made them the same, I cleaned and rebuilt the project and everything was good to go.

更新:

我遇到了这个问题后再次我试图更新我的SDK及其工具。原来,当你尝试这样做时,SDK锁定工具文件夹,然后你会得到一个错误,说一些文件不能被覆盖。当这发生在我身上,所有的生成工具被删除所以有debuggin我的应用程序时创建的.dex文件中的错误。

I ran into the problem again after I tried to update my SDK and its tools. Turns out that when you try to do this, the SDK locks the tools folder and then you get an error saying some file couldn't be overridden. When this happened to me, all the build tools were deleted so there were errors in the .dex file created when debuggin my app.

这篇关于未能安装APK [INSTALL_FAILED_DEXOPT] Android的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆