ресурс android: attr / dialogCornerRadius не найден - PullRequest
0 голосов
/ 02 октября 2019

Я недавно начал получать эту ошибку, когда строю свой проект, используя:

./gradlew app:assembleRelease

Задача: app: processReleaseResources FAILED

FAILURE:Сбой сборки за исключением. Что пошло не так: выполнение задачи не удалось: «app: processReleaseResources». Ошибка связи с ресурсом Android C: \ Users \ Matt.gradle \ caches \ transforms-2 \ files-2.1 \ 51c1e76c432ad37ab506722307c9002f \ res \ values-v28 \ values-v28.xml: 9: 5-12: 13: AAPT: ошибка: ресурсandroid: attr / dialogCornerRadius не найден.

C: \ Users \ Matt \ sites \ tcapp \ android \ app \ build \ промежуточные \ incremental \ mergeReleaseResources \ merged.dir \ values-v28 \ values-v28.xml: 11: AAPT: ошибка: ресурс android: attr / dialogCornerRadius не найден.

C: \ Users \ Matt.gradle \ caches \ transforms-2 \ files-2.1 \ 9f7be746be69bf3adf6576c7401d0fc4 \ res \ values ​​\ values. values. values: 3: 5-58: 857: AAPT: ошибка: ресурс android: attr / fontVariationSettings не найден.

C: \ Users \ Matt.gradle \ caches \ transforms-2 \ files-2.1 \ 9f7be746be69bf3adf6576c7401d0fc4 \ res\ values ​​\ values.xml: 3: 5-58: 857: AAPT: ошибка: ресурс android: attr / ttcIndex не найден.

ошибка: не удалось связать ссылки.

app.build.gradle:

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.rg.tc"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 2
        versionName "2.0"
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    signingConfigs {
         release {
              if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile rootProject.file("app/" + project.findProperty('MYAPP_RELEASE_STORE_FILE') ?: "ANDROID_STORE_FILE_NOT_SET")
                storePassword project.findProperty('MYAPP_RELEASE_STORE_PASSWORD') ?: "ANDROID_STORE_PASSWORD_NOT_SET"
                keyAlias project.findProperty('MYAPP_RELEASE_KEY_ALIAS') ?: "ANDROID_KEY_ALIAS_NOT_SET"
                keyPassword project.findProperty('MYAPP_RELEASE_KEY_PASSWORD') ?: "ANDROID_KEY_PASSWORD_NOT_SET"
              }

            }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    implementation project(':react-native-youtube')
    implementation project(':react-native-webview-bridge')
    implementation project(':react-native-webview')
    implementation project(':react-native-vector-icons')
    implementation project(':react-native-svg')
    implementation project(':react-native-splash-screen')
    implementation project(':react-native-share')
    implementation project(':react-native-gesture-handler')
    implementation project(':@react-native-community_async-storage')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

build.gradle:

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.4.0")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 27 
                buildToolsVersion '27.0.3'
            }
        }
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...