Не удалось найти компилятор ButterKnife - PullRequest
1 голос
/ 03 мая 2019

Я интегрировал ButterKnife в свой проект, с тех пор я не смог его собрать

Я пробовал разные версии библиотеки, но, похоже, ничего не работает

Вотошибка во время сборки:

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:

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'
}

Я уже добавил репозитории jitpack в проект build.gradle:

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }

    }
}

Ответы [ 3 ]

1 голос
/ 03 мая 2019

из эта версия компилятора butterknife 7.0.1 не указана (не найдена) в хранилище mvn

, поэтому используйте последнюю версию lib

  implementation 'com.jakewharton:butterknife:10.1.0'
  annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
1 голос
/ 03 мая 2019

попробуйте

implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
1 голос
/ 03 мая 2019

Используйте это:

compile 'com.jakewharton: butterknife: 8.7.0'

annotationProcessor 'com.jakewharton: butterknife-compiler: 8.7.0'

...