我将这个新库包含在我的依赖项中
compile 'com.github.Triggertrap:SeekArc:v1.1'
然后当我构建时,我得到构建错误
Error:Exception in thread "queued-resource-processor_458" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\kepler\AppData\Local\Android\Sdk\build-tools\27.0.1\aapt2.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReadyOrFail(AaptProcess.java:196)
at com.android.builder.internal.aapt.AaptQueueThreadContext.creation(AaptQueueThreadContext.java:56)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:250)
at java.lang.Thread.run(Thread.java:745)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> Program type already present: android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 20s
根据上述消息,我是否可能存在依赖冲突?
Program type already present: android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl
我已经尝试打印我的依赖树,但我不知道如何找到与它的依赖冲突。
答案 0 :(得分:6)
尝试切换
compile 'com.github.Triggertrap:SeekArc:v1.1'
到
implementation 'com.github.Triggertrap:SeekArc:v1.1'`
如果不起作用,请尝试从新软件包中删除支持库
implementation('com.github.Triggertrap:SeekArc:v1.1') { exclude group: 'com.android.support' }