Jav*_*avi 5 android build.gradle android-gradle-plugin butterknife android-studio-3.0
升级到Android Studio 3.0之后,我遇到了gradle的一些问题,我能够修复开发者网站上的检查
但是,我无法找到如何解决这个问题,apply plugin: 'android-apt'我尝试了几个方面,比如从项目gradle中删除它并将其添加到app gradle中annotationProcessor 'com.neenbedankt.gradle.plugins:android-apt:1.8'.还删除了apt等等.
无论如何,Studio正在抱怨它.任何帮助是极大的赞赏.谢谢!
// 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:3.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.google.gms:google-services:3.1.1'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}
ext {
supportLibVersion = '27.0.0'
firebaseLibVersion = '11.4.2'
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
APP GRADLE
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.0"
defaultConfig {
applicationId "xxxxxxxxxxxxxxxxxxxx"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
apply plugin: 'android-apt'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.android.support:appcompat-v7:${supportLibVersion}"
.....
compile 'com.google.android.gms:play-services-auth:11.4.2'
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
不要使用apt插件,添加如下依赖:
compile "com.jakewharton:butterknife:8.8.1"
annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2914 次 |
| 最近记录: |