Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependencies --> Could not create plugin of type 'AppPlugin'

I'm trying to continue working on an older project of mine, it's about a year old, and was working fine back then, but now after that I've updated AndroidStudio, it can't even build anymore.

I'm getting an error saying that I've got 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 do 'gradle dependencies' to find the culprit, and exclude the faulty file(s), but this is where I run into my actual problem.
When I do '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 --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

And here is my full 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 this is were I'm basically stuck at the moment, I've tried the following to fix the issue:
- Updated AndroidStudio
- Updated all SDK related items
- Updated gradle
- Re-created the entire project in a new folder, then copied over my files to the new project

Each post I find regarding this issue, it says to use Gradle 0.7.3 Instead of 0.7.2 Because of a bug.. But that's like a year old, and no longer valid.

like image 335
Moonbloom Avatar asked Jan 11 '15 23:01

Moonbloom


1 Answers

Try changing gradle version in gradle/wrapper/gradle-wrapper.properties

    distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip

to something like

    distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
like image 198
Piero Avatar answered Nov 10 '22 11:11

Piero