按“运行应用程序"时出现 Gradle 错误- Android Studio 0.4.3 [无法创建工具 API 的实例] [英] Gradle error when pressing "run app" - Android Studio 0.4.3 [ Could not create an instance of Tooling API ]

查看:28
本文介绍了按“运行应用程序"时出现 Gradle 错误- Android Studio 0.4.3 [无法创建工具 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?

我安装了 Android Studio 0.4.3,当我的学校在我的学校计算机上更新 Java 时,这个问题就开始了.

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

org.gradle.tooling.GradleConnectionException:无法使用指定的 Gradle 分发版创建工具 API 实现的实例 'http://services.gradle.org/distributions/gradle-1.9-all.zip'.:无法使用指定的 Gradle 分发创建工具 API 实现的实例 'http://services.gradle.org/distributions/gradle-1.9-all.zip'.

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.+'
}

这并没有解决问题:

推荐答案

关闭 Android Studio,备份并从您的 Studio 安装目录中删除所有这些文件,然后重新启动它,可能对您有帮助

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.

这篇关于按“运行应用程序"时出现 Gradle 错误- Android Studio 0.4.3 [无法创建工具 API 的实例]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆