Good morning, I have a problem that always happens to me. It is with the issue of adding libraries to the project, it usually happens when I place several google libraries, when I run the compatibility error comes out in the libraries, I think it is because there are libraries that use the same module and therefore the error . These are the libraries that I use in the project:
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile files('libs/poi-315.jar')
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.google.android.gms:play-services-plus:9.0.2'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'jp.wasabeef:blurry:2.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile group: 'com.google.android', name: 'support-v4', version: 'r7'
The compilation error comes to me when I add this library to add Google Maps Api v2 to my project:
compile group: 'com.google.android', name: 'support-v4', version: 'r7'
Someone to tell me why this happens? Any good practice so that it does not happen again? What things I have to take into account when adding libraries.
This is the error that comes out:
Error: Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Landroid / support / v4 / accessibilityservice / AccessibilityServiceInfoCompat $ AccessibilityServiceInfoVersionImpl; : app: transformClassesWithDexForDebug FAILED Error: Execution failed for task ': app: transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process. internal.ExecException: Process 'command' C: \ Program Files \ Java \ jdk1.8.0_91 \ bin \ java.exe '' finished with non-zero exit value 2
Thank you very much!