我从github上下载了一个android项目源代码,并用Android Studio打开它,但是当我点击“运行应用程序”按钮,过了一段时间我得到这个错误:无法通过Android Studio安装apk通过Android Studio安装apk,通过Android Studio制作
Installation failed since the device possibly has stale dexed jars that don't match the current version (dexopt error). In order to proceed, you have to uninstall the existing application.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
我在控制台
$ adb push D:\work\zuoyexitong\third-part-projects\AndroidAudioRecorder\app\build\outputs\apk\app-debug.apk /data/local/tmp/cafe.adriel.androidaudiorecorder.example
$ adb shell pm install -r "/data/local/tmp/cafe.adriel.androidaudiorecorder.example"
pkg: /data/local/tmp/cafe.adriel.androidaudiorecorder.example
Failure [INSTALL_FAILED_DEXOPT]
得到这个错误,但我敢肯定,我以前不安装此apk。如果我点击“确定”让Android Studio卸载应用程序,我得到这个错误
$ adb shell pm uninstall cafe.adriel.androidaudiorecorder.example
Unknown failure (Failure)
Error while Installing APK
我的Android Stuido版本是:2.2.3。
我用的项目是here
我的设备的Android版本是4.1.1。
我的问题看起来像this和this,但它们无法解决我的问题。
那么如何解决这个问题呢?
重置我的设备后。问题解决了。 – BHawK