beefe / react-native-picker

A Native Picker with high performance.
1.75k stars 786 forks source link

打包的时候报错 #374

Open majiabin opened 5 years ago

majiabin commented 5 years ago
TaoistWangMo commented 5 years ago

368

👆 this may help to solve this issue ~

LostChrs commented 5 years ago

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 commented 5 years ago

Have you solved this problem?

ghost commented 5 years ago

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 commented 5 years ago

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

hu-qi commented 5 years ago

image

jameshuimin commented 5 years ago

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 commented 4 years ago

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