首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到ButterKnife编译器

找不到ButterKnife编译器
EN

Stack Overflow用户
提问于 2019-05-03 16:57:29
回答 4查看 1.9K关注 0票数 2

我将ButterKnife集成到我的项目中,从那时起,我就不可能构建它了

我尝试过这个库的不同版本,但似乎都不起作用

以下是构建过程中的错误:

代码语言:javascript
复制
Could not find com.jakewharton:butterknife-compiler:7.0.1.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/jakewharton/butterknife-compiler/7.0.1/butterknife-compiler-7.0.1.pom
  - https://dl.google.com/dl/android/maven2/com/jakewharton/butterknife-compiler/7.0.1/butterknife-compiler-7.0.1.jar
  - https://jcenter.bintray.com/com/jakewharton/butterknife-compiler/7.0.1/butterknife-compiler-7.0.1.pom
  - https://jcenter.bintray.com/com/jakewharton/butterknife-compiler/7.0.1/butterknife-compiler-7.0.1.jar
  - https://jitpack.io/com/jakewharton/butterknife-compiler/7.0.1/butterknife-compiler-7.0.1.pom
  - https://jitpack.io/com/jakewharton/butterknife-compiler/7.0.1/butterknife-compiler-7.0.1.jar
Required by:
    project :app

这是我的build.gradle文件:

代码语言:javascript
复制
apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.toto"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    //Retrofit Dependencies
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

    // Butter Knife
    implementation 'com.jakewharton:butterknife:7.0.1'
    implementation 'com.android.support:support-annotations:28.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:7.0.1'

    // ZXing
    implementation 'com.github.tobrun:QR-Vision-Fragment:master-SNAPSHOT'

    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-vector-drawable:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'android.arch.lifecycle:extensions:1.1.1'
    implementation 'com.android.support:design:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
}

我已经在项目build.gradle中添加了jitpack存储库:

代码语言:javascript
复制
allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }

    }
}
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2019-05-03 17:18:30

试试这个

代码语言:javascript
复制
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
票数 1
EN

Stack Overflow用户

发布于 2019-05-03 17:15:49

使用以下命令:

代码语言:javascript
复制
compile 'com.jakewharton:butterknife:8.7.0'

annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
票数 1
EN

Stack Overflow用户

发布于 2019-05-03 17:16:53

来自mvn存储库中未列出(创建)的this butterknife-compiler版本7.0.1

所以使用最新的lib版本

代码语言:javascript
复制
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55966430

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档