gpt4 book ai didi

android multidex 实现

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:34:27 26 4
gpt4 key购买 nike

我有这个错误。

Error:Execution failed for task ':myApp:createDebugMainDexClassList'. com.android.ide.common.internal.LoggedErrorException: Failed to run command: java -Xmx1024M -cp \android-sdk\build-tools\19.1.0\lib\dx.jar com.android.multidex.ClassReferenceListBuilder myApp\build\intermediates\multi-dex\debug\componentClasses.jar myApp\build\intermediates\multi-dex\debug\allclasses.jar

Error Code: 1 Output: Error: Could not find or load main class com.android.multidex.ClassReferenceListBuilder

我正在尝试使用 multidex 库,因为我的应用程序通过了 65000 方法,因为我使用外部库作为 Link描述,我已经在 mainfest 和 build.gradle 文件中添加了这些行,任何提示将不胜感激。谢谢

编辑几次启动后我收到了这个错误。

Error:Execution failed for task ':myApp:dexDebug'. com.android.ide.common.internal.LoggedErrorException: Failed to run command: \android-sdk\build-tools\21.1.0\dx.bat --dex --no-optimize --multi-dex --main-dex-list myApp\build\intermediates\multi-dex\debug\maindexlist.txt --output myApp\build\intermediates\dex\debug --input-list=myApp\build\intermediates\tmp\dex\debug\inputList.txt ,,Error Code:3.

Output: UNEXPECTED TOP-LEVEL ERROR: java.lang.OutOfMemoryError: Java heap space

我试图增加文件“studio64.exe.vmoptions”中 Xms1024m -Xmx1024m 的大小,但它仍然无济于事,我还在设置>编译器>VM 选项 Xms1024m -Xmx1024m 中尝试

最佳答案

根据 https://developer.android.com/tools/building/multidex.html 的 multidex 文档您需要运行构建工具 21.1.0 或更高版本才能使用 multidex。根据您的错误消息,您似乎使用的是 19.1.0。尝试升级。

关于android multidex 实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27802052/

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