6

我已经使用 android studio 3.4 迁移到 androidX,迁移后我每次都面临这个问题。虽然我已经尝试排除黄油刀 compilerAnnotationgradle.properties但这表明WARNING: The option setting 'android.jetifier.blacklist=butterknife.*\.jar' is experimental and unsupported.

我还更新了最新的黄油刀依赖项,JakeWharton 本人在其中提到该问题已得到解决,并且是 jetifier 问题。看看这个解决方法

implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

在我的build.gradle档案中

    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

所以我认为这个支持库会导致问题。我已经尝试了谷歌第一个搜索结果中出现的所有解决方案,但无法解决。

这是我的 build.gradle 文件

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
}


android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.audacityit.selltec"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    // Butterknife requires Java 8.
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

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

    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

    //Support library
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

    //eventbus
    implementation 'org.greenrobot:eventbus:3.1.1'

    //butterknife
    implementation 'com.jakewharton:butterknife:10.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

    //retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'

    //parceler
    implementation 'org.parceler:parceler-api:1.1.9'
    annotationProcessor 'org.parceler:parceler:1.1.9'

    //glide
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

    //palette
    implementation 'androidx.palette:palette:1.0.0'

    //multidex
    implementation 'androidx.multidex:multidex:2.0.1'

    //utility
    implementation 'com.iamsourav.sohoz:sohoz:1.0.0'

    //circleimageview
    implementation 'de.hdodenhof:circleimageview:3.0.0'

    //recycler animator
    implementation 'jp.wasabeef:recyclerview-animators:2.2.7'

    //eventbus
    implementation 'org.greenrobot:eventbus:3.1.1'


    //shimmer
    implementation 'com.github.sharish:ShimmerRecyclerView:v1.2'


    //AutoScrollViewPager
//    implementation('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
//        exclude module: 'support-v4'
//    }

    implementation 'cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2'

    //Flowlayout
    implementation 'com.hyman:flowlayout-lib:1.1.2'

    //two way slider
    implementation 'io.apptik.widget:multislider-holo:1.3'

    implementation 'at.blogc:expandabletextview:1.0.5'


    //shimmer
    implementation 'com.github.sharish:ShimmerRecyclerView:v1.2'

    //google analytics
    implementation 'com.google.android.gms:play-services-analytics:16.0.8'

    //validation
    implementation 'com.mobsandgeeks:android-saripaar:2.0.3'

    //permission dispathcher
    implementation("com.github.hotchemi:permissionsdispatcher:3.1.0") {
        // if you don't use android.app.Fragment you can exclude support for them
        exclude module: "support-v13"
    }
    annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:3.1.0"

    //Image cropper
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'

    //implementation 'com.crystal:crystalrangeseekbar:1.1.1'

    //testing
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
        transitive = true
    }


}
4

0 回答 0