我今天将Android Studio版本从1.5升级到2.0,出了点问题.
首先我得到了Gradle版本错误,因此我将Gradle版本从2.10更新为2.12.
# previous
# distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
# current
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
Run Code Online (Sandbox Code Playgroud)
Gradle版本错误已消失.
但是当我尝试运行我的项目时,我现在遇到了这个错误:
Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run (or updating either the IDE or the Gradle plugin to the latest version)
Run Code Online (Sandbox Code Playgroud)
这是我的Project Gradle.build:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
classpath 'com.google.gms:google-services:2.1.0-alpha1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// NOTE: Do not place your …Run Code Online (Sandbox Code Playgroud)