问题描述
是的,我已经查看了所有问题和答案并尝试了所有解决方案。
注意 APK 未安装在模拟器上,因此卸载它不是一个有效的选择。
我使用的是 Android Studio 4.1.3,Screenshot of Android Version
这只是在模拟器更新后发生的,我也尝试了各种模拟器
04/03 16:12:16: Launching 'app' on Pixel 4 API R.
Installation did not succeed.
The application Could not be installed: INSTALL_PARSE_Failed_NOT_APK
List of apks:
[0] 'C:\Users\xxx\AndroidStudioProjects\MyApp\app\build\outputs\apk\debug\app-debug.apk'
Installation Failed due to: 'null'
它在我的三星 A50 上安装并运行良好,但可以看出,不能安装在模拟器上。
我删除了模拟器,创建了一个新设备等,并在此处执行了所有建议Installation failed due to: 'null' - Android Studio 3.5
这是事件日志
16:45 Failed to commit install session 1484155752 with command cmd package install-commit 1484155752. Error: INSTALL_PARSE_Failed_NOT_APK: Failed parse during installPackageLI: Failed to parse base APK: /data/app/vmdl1484155752.tmp/base.apk
16:45 Session 'app': Installation did not succeed.
The application Could not be installed: INSTALL_PARSE_Failed_NOT_APK
Retry
16:45 Error
Installation did not succeed.
The application Could not be installed: INSTALL_PARSE_Failed_NOT_APK
Retry
16:45 Failed to start monitoring emulator-5554
解决方法
感谢所有回复,我将 minSdkVersion 回退到 29,将 targetSdkVersion 回退到 29,问题似乎已解决,可能是 R 的错误