gpt4 book ai didi

android - 无法将应用程序从 Android Studio 2.3.0 运行到 Genymotion 2.8.1 中的模拟器

转载 作者:行者123 更新时间:2023-11-29 17:00:58 26 4
gpt4 key购买 nike

我正在尝试将应用程序从 Android Studio 2.3.0 运行到 Genymotion 模拟器,(模拟器规范:Nexus 5 API 22 res 1080x1920 px 4 proc,2GB RAM)但它总是失败并显示此错误消息:

Installation failed with message Failed to install all .
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

图片: enter image description here

然后当我点击确定时,另一个错误出现在左下角: enter image description here

错误信息:

03/25 10:10:56: Launching app
$ adb install-multiple -r /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_0.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/outputs/apk/app-debug.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_5.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/dep/dependencies.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_1.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_6.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_4.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_3.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_2.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_7.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_8.apk /home/dana/AndroidStudioProjects/Samples/CRUD/app/build/intermediates/split-apk/debug/slices/slice_9.apk
Error while Installing APKs

图片: enter image description here

以及来自事件日志的另一条错误消息:

10:08 AM    Session 'app': Error Installing APKs

10:10 AM Executing tasks: [:app:assembleDebug]

10:10 AM Gradle build finished in 1s 533ms

10:10 AM Error while uploading slice_0.apk : WARNING: linker: /system/lib/libhoudini.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
Success: streamed 60803 bytes

图片:enter image description here

我的笔记本电脑规范是 Linux Mint Cinnamon 64 位,如图所示:enter image description here

据我所知,这个问题是在apk被adb分割成多个部分时与adb有关。

当我尝试从同一个 genymotion 将应用程序运行到不同的模拟器时,我遇到了同样的错误。模拟器规范是 Nexus 5 API 23,具有 1 个进程和 2 GB RAM。

我相信我不是唯一一个遇到这个问题的人。我将不胜感激任何帮助。先谢谢

最佳答案

将此添加到您的 list 文件

 dexOptions {
javaMaxHeapSize "4g"
}

关于android - 无法将应用程序从 Android Studio 2.3.0 运行到 Genymotion 2.8.1 中的模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43012162/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com