使用转换JetifyTransform

时间:2019-08-26 13:43:50

标签: android androidx android-jetifier

我正在将现有项目迁移到Androidx。添加这2行之后

android.useAndroidX=true
android.enableJetifier=true

gradle.properties中,出现一堆编译错误。我找到了很多解决方案,但对我没有任何帮助。请帮帮我。谢谢

gradle(应用级)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.faridabadtaxirider"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    buildToolsVersion '28.0.3'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
    //Add library

    implementation 'com.github.aarsy.googlemapsanimations:googlemapsanimations:1.0.5'
    implementation 'com.facebook.android:account-kit-sdk:4.29.0'
    implementation 'io.paperdb:paperdb:2.6'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'me.zhanghai.android.materialratingbar:library:1.2.0'
    implementation 'com.google.maps.android:android-maps-utils:0.5+'
    implementation 'com.google.firebase:firebase-messaging:19.0.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
    implementation 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar'
    implementation 'com.firebase:geofire-android:2.1.2'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'//Fix crash account kit
    implementation 'com.github.d-max:spots-dialog:1.1@aar'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'com.google.firebase:firebase-core:17.0.1'
    implementation 'com.google.firebase:firebase-database:18.0.1'
    implementation 'com.google.firebase:firebase-storage:18.1.1'
    implementation 'com.google.android.material:material:1.0.0-beta01'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    implementation 'androidx.cardview:cardview:1.0.0-beta01'
    implementation 'com.google.android.libraries.places:places:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.5'
}
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

似乎'me.zhanghai.android.materialratingbar:library:1.2.0'与AndroidX不兼容。尝试使用该库的最新版本。