Gradle error - Startup failed

Asked

Viewed 78 times

0

What’s wrong with my Gradle?

apply plugin: 'com.android.application'

 android {
compileSdkVersion 25
buildToolsVersion '25.0.1'
defaultConfig {
    applicationId "com.example.thiago.myapplication"
    minSdkVersion 20
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {support:design
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
  useLibrary 'org.apache.http.legacy'
}

 dependencies {
 compile fileTree(dir: 'libs', include: ['*.jar'])
 androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{
    exclude group: 'com.android.support', module: 'support-annotations'
})

compile('com.kishan.askpermission:askpermission:1.0.3', {
    exclude group: 'com.android.support'
})
compile group: 'org.apache.httpcomponents', name: 'httpclient-android', version: '4.3.5.1'
compile 'com.kishan.askpermission:askpermission:1.0.3'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.google.code.gson:gson:2.7'
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.nispok:snackbar:2.6.1'
}

Error :

inserir a descrição da imagem aqui

  • I ask you! what’s wrong with your Gradle? If there is an error appearing, you have to put in your question, otherwise it is difficult to find an answer.

  • I’m sorry, I made a mistake ..

1 answer

4


The problem is occurring because there is no property support in Gradle, as stated on the line buildTypes {support:design, as well as in the error message itself:

In case you tried to configure a Property named 'support', replace ':' with '=' or ' ', otherwise it will not have the desired Effect.

Remove the support:design of your buildTypes. See below how it should look:

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
  • 1

    Thank you for the reply !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.