Как исправить имя пакета 'android.support.graphics.drawable', используемое в: com.android.support:animated-vector-drawable:28.0.0 - PullRequest
1 голос
/ 06 мая 2019

AndroidManifest.xml Ошибка: имя пакета 'android.support.graphics.drawable' используется в: com.android.support:animated-vector-drawable:28.0.0, com.android.support:support-vector-drawable: 28.0.0

https://imgur.com/6aFUN59

https://imgur.com/C1EmnJ3

Произошла ошибка после обновления Android Studio 3.4. Уже попробуйте изменить compileSdk на 27 / 27.1.1, новсе то же самое и уже пытается отключить "vector-drawable" lib, но все еще то же самое.,,,,,,.

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://maven.fabric.io/public'}
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'io.fabric.tools:gradle:1.26.1'
        classpath 'com.google.firebase:firebase-plugins:1.2.0'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "xxx.packacge.name"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 4
        versionName "Dev"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    applicationVariants.all { variant ->
        //variant.getAssembleProvider()
        variant.outputs.all {
            outputFileName = "${variant.name}-${variant.versionName}.apk"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            debuggable false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }
    buildToolsVersion = '28.0.3'
}

repositories {
    mavenCentral()
    jcenter()
    maven { url 'https://maven.google.com' }

}

dependencies {

    configurations.all {
        exclude group: 'com.android.support', module: 'support-v13'
    }
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-vector-drawable:28.0.0'
    implementation 'com.android.support:animated-vector-drawable:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha5'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:support-fragment:28.0.0'

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

..

buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
        maven {
            url 'https://maven.fabric.io/public'
        }
        maven {
            url 'https://maven.google.com/'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
        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
        classpath 'com.google.firebase:firebase-plugins:1.2.0'
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

..

1 Ответ

0 голосов
/ 06 мая 2019

Вы должны попробовать этот способ

    implementation('com.android.support:support-vector-drawable:28.0.0') {
            exclude group: 'android.support.graphics.drawable'
            exclude module: 'support-vector-drawable'
        }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...