Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use
2017-11-30 12:17
417 查看
Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use ‘annotationProcessor’ configuration instead.
原因:更新Android studio 原来项目出现问题。
分析: 尤其是采用butterknife工具的,采用新的Android Studio都会出现这样的问题,本人根据提示最后猜测原因可能是Android studio更新,然后gradle更新了,这样的话可能使原来的android-apt 工具跟不上节奏了,所以让采用annotationProcessor工具。
解决: 把project下的build.gradle 当中的依赖
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘com.android.tools.build:gradle:2.4.0-alpha7’
classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’
}
}
修改成如下:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘com.android.tools.build:gradle:2.4.0-alpha7’
}
}
然后再把module下的build.gradle :
dependencies {
compile project(‘:roadvance-sdk’)
compile ‘com.google.dagger:dagger:2.10’
apt ‘com.google.dagger:dagger-compiler:2.10’
compile ‘com.android.support:appcompat-v7:25.3.1’
compile ‘com.jakewharton:butterknife:8.5.1’
apt ‘com.jakewharton:butterknife-compiler:8.5.1’
}
修改如下:
dependencies {
compile project(‘:roadvance-sdk’)
compile ‘com.google.dagger:dagger:2.10’
annotationProcessor ‘com.google.dagger:dagger-compiler:2.10’
compile ‘com.android.support:appcompat-v7:25.3.1’
compile ‘com.jakewharton:butterknife:8.5.1’
annotationProcessor ‘com.jakewharton:butterknife-compiler:8.5.1’
}
再把 apply plugin: ‘com.neenbedankt.android-apt ’ 这个引用给删除。
重新reBuild的一下
原因:更新Android studio 原来项目出现问题。
分析: 尤其是采用butterknife工具的,采用新的Android Studio都会出现这样的问题,本人根据提示最后猜测原因可能是Android studio更新,然后gradle更新了,这样的话可能使原来的android-apt 工具跟不上节奏了,所以让采用annotationProcessor工具。
解决: 把project下的build.gradle 当中的依赖
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘com.android.tools.build:gradle:2.4.0-alpha7’
classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’
}
}
修改成如下:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘com.android.tools.build:gradle:2.4.0-alpha7’
}
}
然后再把module下的build.gradle :
dependencies {
compile project(‘:roadvance-sdk’)
compile ‘com.google.dagger:dagger:2.10’
apt ‘com.google.dagger:dagger-compiler:2.10’
compile ‘com.android.support:appcompat-v7:25.3.1’
compile ‘com.jakewharton:butterknife:8.5.1’
apt ‘com.jakewharton:butterknife-compiler:8.5.1’
}
修改如下:
dependencies {
compile project(‘:roadvance-sdk’)
compile ‘com.google.dagger:dagger:2.10’
annotationProcessor ‘com.google.dagger:dagger-compiler:2.10’
compile ‘com.android.support:appcompat-v7:25.3.1’
compile ‘com.jakewharton:butterknife:8.5.1’
annotationProcessor ‘com.jakewharton:butterknife-compiler:8.5.1’
}
再把 apply plugin: ‘com.neenbedankt.android-apt ’ 这个引用给删除。
重新reBuild的一下
相关文章推荐
- 解决Warning:android-apt plugin is incompatible with future version of Android Gradle plugin.
- Warning:android-apt plugin is incompatible with future version of Android Gradle plugin
- Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProce
- Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProc
- 报错:Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationP
- android Error running app: This version of Android Studio is incompatible with the Gradle Plugin use
- 解决 android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcesso
- Android 解决Error running app: This version of Android Studio is incompatible with the Gradle Plugin
- Error running example: This version of Android Studio is incompatible with the Gradle Plugin used.解决
- This version of Android Studio is incompatible with the Gradle Plugin used
- 编译错误This version of Android Studio is incompatible with the Gradle Plugin used
- Error running app: This version of Android Studio is incompatible with the Gradle Plugin used.
- this version of Android Studio is incompatible with the Gradle Plugin used. try disabling Instant Ru
- Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try d
- This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Ru
- Error running demo: This version of Android Studio is incompatible with the Gradle Plugin used.
- This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant R
- [Android]Error running app: This version of Android Studio is incompatible with the Gradle Plugin us
- This version of Android Studio is incompatible with the Gradle Plugin used
- Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try d