react-native-picker icon indicating copy to clipboard operation
react-native-picker copied to clipboard

打包的时候报错

Open majiabin opened this issue 5 years ago • 8 comments

  • What went wrong: Execution failed for task ':react-native-picker:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed E:\Projects\APP\YDJW\node_modules\react-native-picker\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. E:\Projects\APP\YDJW\node_modules\react-native-picker\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. E:\Projects\APP\YDJW\node_modules\react-native-picker\android\build\intermediates\res\merged\release\values\values.xml:2727: error: resource android:attr/fontVariationSettings not found. E:\Projects\APP\YDJW\node_modules\react-native-picker\android\build\intermediates\res\merged\release\values\values.xml:2728: error: resource android:attr/ttcIndex not found. error: failed linking references.

majiabin avatar Apr 12 '19 11:04 majiabin

#368 👆 this may help to solve this issue ~

TaoistWangMo avatar Apr 17 '19 09:04 TaoistWangMo

You need to add following code in your project's android/build.gradle:

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

LostChrs avatar Apr 20 '19 15:04 LostChrs

Have you solved this problem?

Tarkzeng avatar May 08 '19 08:05 Tarkzeng

Updating node_modules/react-native-picker/android/build.gradle sdk version to 28( using React Native 0.59.5) fixes it.

android {
    compileSdkVersion 28 
    //buildToolsVersion "23.0.1"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28

sosospicy avatar May 10 '19 10:05 sosospicy

@LostChrs 谢谢你的帮助!解決了

acro5piano avatar Jul 07 '19 02:07 acro5piano

image

hu-qi avatar Jul 16 '19 07:07 hu-qi

Updating node_modules/react-native-picker/android/build.gradle sdk version to 28( using React Native 0.59.5) fixes it.

android {
    compileSdkVersion 28 
    //buildToolsVersion "23.0.1"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28

it is working for me

jameshuimin avatar Sep 18 '19 03:09 jameshuimin

def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } android { compileSdkVersion safeExtGet('compileSdkVersion', 27) buildToolsVersion safeExtGet('buildToolsVersion', '23.0.1') ... }

asasugar avatar Dec 17 '19 08:12 asasugar