gpt4 book ai didi

java - INSTALL_FAILED_MISSING_SHARED_LIBRARY 和意外的顶级异常

转载 作者:行者123 更新时间:2023-11-29 21:07:47 25 4
gpt4 key购买 nike

所以我正在开发一个实现 Caldroid 库的 Android 应用程序。起初,当我尝试构建应用程序时,出现了 DexException。我通过从 Syncc/app/build/exploded-aar/Syncc/caldroid/unspecified/libs

中删除 android-support-v4.jar 文件来解决这个问题

'Syncc' 是应用程序的名称,'app' 是模块。我不太清楚那是什么意思(如果有人能澄清我将非常感激)但这是 AndroidStudio 的做法。

因此,在我尝试构建应用程序时删除该文件后,它可以正常工作,但无法将其安装到我的设备上。终端显示如下:

Waiting for device.
Target device: samsung-gt_n7100-4d005d114bf9604f
Uploading file
local path: C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\apk\app-debug-unaligned.apk
remote path: /data/local/tmp/com.nttkjwmp.syncc.app
Installing com.nttkjwmp.syncc.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.nttkjwmp.syncc.app"
pkg: /data/local/tmp/com.nttkjwmp.syncc.app
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]

这是我将文件放回时的终端输出:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\Nicolas\AppData\Local\Android\android-studio\sdk\build-tools\android-4.4.2\dx.bat --dex --output C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\dex\debug C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\classes\debug C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\dependency-cache\debug C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\android-support-v4-dcbacb5a563a38baf2818d3992287104d67e74f2.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\classes-1d8979f21bebf58bb6900d1b0d10af9c29510f44.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\classes-848439748d02ee11d97f22ad9f7789545209e0f1.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\date4j-b11e34e16255b8734f64de0013eac10517e12be4.jar C:\Users\Nicolas\AndroidStudioProjects\Syncc\app\build\pre-dexed\debug\support-v4-19.1.0-a9f29dd44ea69fc9776ae436c7b280cb22ffdec4.jar
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)

那么有人能指出我在这里遗漏了什么吗?我是否必须删除另一个文件或向 gradle 文件中添加一些内容?提前致谢!

最佳答案

它看起来像是您的应用程序通过 <uses-library> 需要的一些库在 AndroidManifest.xml在设备上丢失。如果这是 com.google.android.maps尝试用 Google Play 服务替换它。

关于java - INSTALL_FAILED_MISSING_SHARED_LIBRARY 和意外的顶级异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23963903/

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