我正在努力解决Android Studio
Unable to create debug or signed apk
的问题。
Task :app:multiDexListDebug FAILED
Task :app:multiDexListDebug in app Finished
:app:multiDexListDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 2.62 secs.
AAPT2 aapt2-3.5.2-5435860-linux Daemon #0: shutdown
失败:构建失败,并出现异常。
出了什么问题:
Execution failed for task ':app:multiDexListDebug'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: kotlin.StandardKt__SynchronizedKt
场景已尝试:
multidex
是Multidex 2.0.1
(android x)org.jetbrains.kotlin
。api
和runtimeOnly
答案 0 :(得分:0)
一旦在您的应用程序级别build.gradle中包含以下代码,并检查
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}