butterknife 8.8.1:找不到 id 'com.jakewharton.butterknife' 的插件
butterknife 8.8.1 : Plugin with id 'com.jakewharton.butterknife' not found
每次我尝试 运行 我的项目都会遇到问题,错误插件 ID 'com.jakewharton.butterknife' 未找到。出现
有人能告诉我这段代码是怎么回事吗??
我被卡住了,感谢任何帮助
这是 gradle
apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
flavorDimensions "default"
defaultConfig {
minSdkVersion 15
targetSdkVersion 27
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
final SUPPORT_LIB_VERSION = '27.0.2'
final COLOR_PICKER_VERSION = '1.5'
final BUTTER_KNIFE_VERSION = '8.8.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services-ads:11.8.0'
//noinspection GradleCompatible
compile "com.android.support:appcompat-v7:27.0.2"
compile "com.larswerkman:HoloColorPicker:1.5"
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile project(':library')
}
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
allprojects {
repositories {
google()
maven {
url "https://maven.google.com"
}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
项目gradle
我认为您需要为 Android Studio 3.0 及更高版本使用 SNAPSHOT
,或者将 ButterKnife
降级为 8.4.0
:annotationProcessor
、library
和 plugin
这也有效。已测试。
每次我尝试 运行 我的项目都会遇到问题,错误插件 ID 'com.jakewharton.butterknife' 未找到。出现 有人能告诉我这段代码是怎么回事吗?? 我被卡住了,感谢任何帮助 这是 gradle
apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
flavorDimensions "default"
defaultConfig {
minSdkVersion 15
targetSdkVersion 27
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
final SUPPORT_LIB_VERSION = '27.0.2'
final COLOR_PICKER_VERSION = '1.5'
final BUTTER_KNIFE_VERSION = '8.8.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services-ads:11.8.0'
//noinspection GradleCompatible
compile "com.android.support:appcompat-v7:27.0.2"
compile "com.larswerkman:HoloColorPicker:1.5"
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile project(':library')
}
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
allprojects {
repositories {
google()
maven {
url "https://maven.google.com"
}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
项目gradle
我认为您需要为 Android Studio 3.0 及更高版本使用 SNAPSHOT
,或者将 ButterKnife
降级为 8.4.0
:annotationProcessor
、library
和 plugin
这也有效。已测试。