【问题标题】:uses reserved file or directory name 'res'使用保留的文件或目录名称“res”
【发布时间】:2019-08-08 23:31:00
【问题描述】:

我正在尝试使用 gitlab 管道对应用程序进行签名。提交并发布到 gitlab 后,应用程序将在 5 分钟后进入管道。我收到如下错误

    * What went wrong:
Execution failed for task ':app:packageReleaseBundle'.
> 1 exception was raised by workers:
  com.android.tools.build.bundletool.exceptions.BundleFileTypesException$FileUsesReservedNameException: File 'root/res/drawable-hdpi/sym_keyboard_feedback_delete.png' uses reserved file or directory name 'res'.

我不知道如何解决这个问题。我不知道你需要什么来解决这个问题。如果您需要看什么,请告诉我。

这是我的 gradle 文件;

apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.bugsnag.android.gradle'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.packageName"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        manifestPlaceholders = ['appPackageName'               : 'com.packagename',
                                onesignal_app_id               : 'onesignal app id',
                                // Project number pulled from dashboard, local value is ignored.
                                onesignal_google_project_number: 'REMOTE']
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        lintOptions {
            abortOnError false
        }
    }

    buildTypes {
        debug {
            minifyEnabled false // shrink
            useProguard false   // don't obfuscate when set to FALSE

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        release {
            minifyEnabled true  // shrink
            useProguard true    // obfuscate

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    configurations {
        cleanedAnnotations
        compile.exclude group: 'org.jetbrains', module: 'annotations'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-compat:28.0.0'
    implementation 'com.android.support:customtabs:28.0.0'
    implementation 'com.android.support:animated-vector-drawable:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:palette-v7:28.0.0'
    implementation 'com.android.support:support-media-compat:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.localytics.android:library:3.8.0'
    implementation 'com.adobe.creativesdk.foundation:auth:0.3.94'
    implementation 'com.adobe.creativesdk:image:4.6.3'

    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

    implementation 'com.google.firebase:firebase-core:16.0.7'

    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.bugsnag:bugsnag-android:4.+'
    implementation 'com.flurry.android:analytics:11.6.0'


    implementation 'com.kochava.base:tracker:3.6.0'


    implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
    implementation 'com.facebook.android:facebook-android-sdk:4.41.0'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'com.github.jd-alexander:android-flat-button:v1.1'

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

【问题讨论】:

  • 看起来这个问题是stackoverflow.com/questions/53263832/…的欺骗
  • 试过对我没用
  • 你能说一下你是如何依赖拉取这个资源的依赖吗?
  • 我不知道如何以及为什么要提取此资源。通常我从来没有在活动或某处编码过这个资源。当我尝试通过键入 gradlew build 从终端构建时,它正在工作。我的意思是它正在建设中。但是当我从 gitlab 尝试这个错误时。
  • 而且这个资源不在我的项目中,你可以从错误中理解。

标签: android android-app-bundle


【解决方案1】:
android{  
 configurations {
        compile.exclude group: 'com.google.android'
    }
}

通过添加解决它。

【讨论】:

    【解决方案2】:

    尝试更新Facebook SDK

    // Facebook Android SDK (everything)
    implementation 'com.facebook.android:facebook-android-sdk:5.0.0'
    

    【讨论】:

      猜你喜欢
      • 2022-10-06
      • 1970-01-01
      • 2019-04-09
      • 2020-01-27
      • 1970-01-01
      • 1970-01-01
      • 2021-09-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多