Iβm trying to continue working on my old project, itβs been around for about a year, and then it worked fine, but now after that I updated AndroidStudio, it can no longer build.
I get a message that I have the same dex file twice:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
To fix this, I could simply run 'gradle dependencies' to find the culprit and exclude the faulty file (s), but this is where I am encountering my real problem.
When I execute the 'gradle dependencies, I get the following error:
FAILURE: Build failed with an exception. * Where: Build file 'F:\Github\Coinbook\app\build.gradle' line: 1 * What went wrong: A problem occurred evaluating project ':app'. > Could not create plugin of type 'AppPlugin'. * Try: Run with
And here is my complete build.gradle file:
apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.moonrain.coinbook" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "0.7" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile project(':libs:AndroidBootstrap') compile files('libs/socialauth-4.4.jar') compile files('libs/socialauth-android-3.2.jar') compile 'com.doomonafireball.betterpickers:library:1.5.2' compile 'com.jakewharton:butterknife:6.0.0' compile 'com.astuetz:pagerslidingtabstrip:1.0.1' compile 'com.github.castorflex.smoothprogressbar:library:1.0.0' compile 'com.squareup.picasso:picasso:2.3.4' compile 'com.readystatesoftware.systembartint:systembartint:1.0.4' compile 'com.google.code.gson:gson:2.3' }
So, I basically got stuck at the moment, I tried the following to fix the problem:
- Updated AndroidStudio
- Updated all SDK related items
- Updated gradle
- recreated the whole project in a new folder, and then copied my files to the new project
Every post I find in this issue says it uses Gradle 0.7.3 instead of 0.7.2 due to an error. But it looks like a year and is no longer valid.
android build gradle
Moonbloom
source share