johgru
johgru

Reputation: 241

Gradle error when pressing "run app" - Android Studio 0.4.3 [ Could not create an instance of Tooling API ]

I'm getting this error when I press "run app". I been searching for a fix the last two days, can you help me?

I have Android Studio 0.4.3 installed, this issue started when my school update Java on my school computer.

org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.9-all.zip'.: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.9-all.zip'.

    buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.7.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
    }
    buildTypes {
        release {
            runProguard false
            proguardFile getDefaultProguardFile('proguard-android.txt')
        }
    }
    productFlavors {
        defaultFlavor {
            proguardFile 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.android.support:appcompat-v7:18.0.+'
}

This did not solve the issue:

Upvotes: 3

Views: 2662

Answers (1)

Piyush Agarwal
Piyush Agarwal

Reputation: 25858

Close Android Studio, take a backup and delete all these files from your studio setup directory and start it again, might be it can help you

android-studio/plugins/android/lib/builder-0.6.1.jar
android-studio/plugins/android/lib/builder-model-0.6.1.jar
android-studio/plugins/gradle/lib/gradle-base-services-1.8.jar
android-studio/plugins/gradle/lib/gradle-build-setup-1.8.jar
android-studio/plugins/gradle/lib/gradle-core-1.8.jar
android-studio/plugins/gradle/lib/gradle-messaging-1.8.jar
android-studio/plugins/gradle/lib/gradle-native-1.8.jar
android-studio/plugins/gradle/lib/gradle-plugins-1.8.jar
android-studio/plugins/gradle/lib/gradle-tooling-api-1.8.jar
android-studio/plugins/gradle/lib/gradle-wrapper-1.8.jar
android-studio/plugins/gradle/lib/guava-11.0.2.jar

Let me know if it doesn't solve your problem.

Upvotes: 1

Related Questions