添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Ошибка Android: "Файл 'root/res/drawable-mdpi/popup_bottom_medium.9.png' использует зарезервированный файл или имя каталога'res'".

У моего Android-проекта есть ошибка при создании подписанного APK, как показано ниже.

File 'root/res/drawable-mdpi/popup_bottom_medium.9.png' uses reserved file or directory name 'res'.ere
 

Она не появилась, когда я создал APK без синхронизации.

Я нашел popup_bottom_medium в Android SDK (android-28) но не знаю, почему ошибка возникает в этом конкретном файле.

enter image description here

Пожалуйста, помогите нам

позвольте мне добавить build.gradle в наш код. На самом деле в этом проекте мы используем две самодельные библиотеки. Поэтому у нас есть три build.gradle.

  1. build.gradle для самого приложения
apply plugin: 'com.android.application'
android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "xxx.xxx.xxx"
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "0.0.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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 project(path: ':mylibrary')
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.parse.bolts:bolts-tasks:1.4.0'
    implementation 'com.parse.bolts:bolts-applinks:1.4.0'
    implementation project(path: ':ERSDKLogin')
    implementation 'com.github.bumptech.glide:glide:4.4.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    // Measures against compile errors that occur when adding「'com.google.android.gms:play-services-maps:16.0.0' 」
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:support-media-compat:28.0.0'
    implementation 'com.android.support:animated-vector-drawable:28.0.0'
    implementation 'com.android.support:customtabs:28.0.0'
    //graphLibrary
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
 
  1. build.gradle для одной библиотеки
    apply plugin: 'com.android.library'
    android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    // TODO Remove and fix lint issues
    lintOptions {
        abortOnError false
    dependencies {
        api project(':aws-android-sdk-core')
        api project(':aws-android-sdk-cognitoidentityprovider')
        api project(':facebook-common')
        api project(':facebook-core')
        api project(':facebook-login')
        api 'com.google.android.gms:play-services-auth:16.0.1'
        api 'com.squareup.retrofit2:retrofit:2.4.0'
        api 'com.squareup.retrofit2:converter-jackson:2.4.0'
        api 'com.fasterxml.jackson.core:jackson-databind:2.9.5'
        api 'com.squareup.okhttp3:logging-interceptor:3.10.0'
        compileOnly 'org.projectlombok:lombok:1.16.22'
        annotationProcessor 'org.projectlombok:lombok:1.16.22'
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation "com.android.support:appcompat-v7:${project.ext.supportLibraryVersion}"
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        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'
    repositories {
        flatDir{
            dirs 'libs'
 
  1. build.gradle для двух библиотек
apply plugin: 'com.android.library'
android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
dependencies {
    implementation project(':ERSDKLogin')
    compileOnly fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    //noinspection GradleCompatible
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'no.nordicsemi.android.support.v18:scanner:1.0.0'
    implementation 'no.nordicsemi.android:dfu:1.6.1'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.parse.bolts:bolts-tasks:1.4.0'
    implementation 'com.parse.bolts:bolts-applinks:1.4.0'
    implementation 'com.google.android.gms:play-services-fitness:15.0.1'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'
    implementation 'com.google.android.gms:play-services-location:15.0.1'