导入第三方library编译报错
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lorg/jetbrains/annotations/PropertyKey;
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 34s
解决办法
gradle下导依赖的地方把这行注掉:
compile fileTree(include: ['*.jar'], dir: 'libs')
这种报错的情况有很多,每个人情况都不一样,这里是我的一个建议
想看Android build.gradle配置详解可以点这里