Android - Error converting bytecode to dex

ⅰ亾dé卋堺 提交于 2019-12-25 08:15:04

问题


The app was working fine until I added a couple of libraries in the gradle file, I added the Google analytics and Admob library (which worked fine but the others who had the same problem said that Google Analytics library is the source of this error) and recently I added a third party library for styling a custom material design Scrollbar

Update I got the third party library for the scrollbar FROM HERE

Here's my dependencies :

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'

Event Log:

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

来源:https://stackoverflow.com/questions/40827973/android-error-converting-bytecode-to-dex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!