Android - 将字节码转换为dex时出错

时间:2016-11-27 10:37:43

标签: android dependencies android-gradle

应用程序运行正常,直到我在gradle文件中添加了几个库, 我添加了谷歌分析和Admob库(虽然工作正常,但其他有相同问题的人说谷歌分析库是这个错误的根源),最近我添加了第三方库来设计自定义材料设计Scrollbar

更新我获得了滚动条的第三方库FROM HERE

这是我的依赖关系:

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:23.4.0'
  compile 'com.android.support:design:23.4.0'
  compile 'com.android.support:support-v4:23.4.0'
  compile 'com.android.support:cardview-v7:23.4.0'
  compile 'com.android.support:recyclerview-v7:23.4.0'
  compile 'com.google.android.gms:play-services-ads:10.0.0'
  compile 'com.google.firebase:firebase-core:10.0.0'
  compile 'com.simplecityapps:recyclerview-fastscroll:1.0.11' //The scrollbar library
  testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

事件记录:

Information:Gradle tasks[:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

0 个答案:

没有答案