Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打包的时候报错 #374

Open
majiabin opened this issue Apr 12, 2019 · 8 comments
Open

打包的时候报错 #374

majiabin opened this issue Apr 12, 2019 · 8 comments

Comments

@majiabin
Copy link

  • 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.

@TaoistWangMo
Copy link

#368
👆 this may help to solve this issue ~

@LostChrs
Copy link

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"
            }
        }
    }
}

@Tarkzeng
Copy link

Tarkzeng commented May 8, 2019

Have you solved this problem?

@ghost
Copy link

ghost commented May 10, 2019

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

@acro5piano
Copy link

acro5piano commented Jul 7, 2019

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

@hu-qi
Copy link

hu-qi commented Jul 16, 2019

image

@jameshuimin
Copy link

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

@asasugar
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants