Androidx:ERROR:无法解决:legacy-support-core-utils

时间:2019-06-06 14:35:17

标签: android android-studio androidx mapbox-android

尝试将我的android应用迁移到androidX时出现此错误 与此implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.3.0' 但可以: 实施'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v7:0.8.0' 实施'com.mapbox.mapboxsdk:mapbox-sdk-services:4.6.0'

这个build.gradle

    apply plugin: 'com.android.application'
 android {  
    compileSdkVersion 28
    defaultConfig {
        applicationId "net.healthintouch.hit"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 7
        versionName "1.013"
        multiDexEnabled true
        testInstrumentationRunner "android.support.register.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true

    }
    buildTypes {
        def baseUrl
        release {
            baseUrl = '\"http://healthintouch.me/"'
            buildConfigField 'String', 'BASE_URL', baseUrl
            resValue  "string", "BASE_URL", "healthintouch.me"
            buildConfigField 'Boolean', 'enableCrashlytics', 'true'
            debuggable false
            minifyEnabled true
            shrinkResources true
//            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
        debug {
            baseUrl = '\"http://192.168.1.3/"'
            buildConfigField 'String', 'BASE_URL', baseUrl
            resValue  "string", "BASE_URL", "healthintouch.me"
            debuggable true
            ext.enableCrashlytics = false

            minifyEnabled false
            shrinkResources false
            useProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }

    }
    dataBinding {
        enabled = true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildToolsVersion '28.0.3'

}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'
    implementation 'androidx.core:core:1.2.0-alpha01'
    implementation 'com.google.android.material:material:1.1.0-alpha07'
//    implementation 'androidx.cardview:cardview:1.0.0-rc02'
//    implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
    implementation 'androidx.multidex:multidex:2.0.1'

    implementation 'androidx.databinding:databinding-adapters:3.6.0-alpha02'
    implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0-alpha01'

    implementation 'com.jakewharton:butterknife:10.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
    implementation 'com.wang.avi:library:2.1.3'
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-messaging:18.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'br.com.mauker.materialsearchview:materialsearchview:1.2.3'


    implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
    implementation 'com.google.android:flexbox:1.0.0'
    implementation 'id.zelory:compressor:2.1.0'
    implementation 'com.github.arabiaweather:arabic-time-sense:1.0.1'
    implementation 'com.github.mthli:Knife:v1.1'
    implementation 'com.github.drawers:SpinnerDatePicker:1.0.6'
    implementation 'com.github.PierfrancescoSoffritti:AndroidYouTubePlayer:7.0.1'
    implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1'
    implementation 'com.google.android.exoplayer:exoplayer-ui:2.8.2'
    implementation 'org.jsoup:jsoup:1.8.3'
    implementation 'com.leocardz:link-preview:2.0.0@aar'
//    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.5.0-beta.1'

    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v7:0.8.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.6.0'

    implementation 'com.danikula:videocache:2.7.1'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
    implementation "com.daimajia.swipelayout:library:1.2.0@aar"
    implementation 'com.codesgood:justifiedtextview:1.1.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation group: 'com.github.michaelgantman', name: 'MgntUtils', version: '1.5.0.3'

    testImplementation 'junit:junit:4.12'

}
apply plugin: 'com.google.gms.google-services'

这是buid.gradle

buildscript {
    repositories {
        maven { url 'https://maven.google.com' }
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        maven { url 'https://maven.google.com' }
        maven { url "https://jitpack.io" }
        maven { url 'https://github.com/leonardocardoso/mvn-repo/raw/master/maven-deploy'}
        google()
        jcenter()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

有答案吗?

1 个答案:

答案 0 :(得分:0)

我遇到了这个问题,所以我升级了Gradle插件版本,然后解决了。