Open Jeijie opened 5 years ago
I am also getting this with RN 59.1
Go to node_modules/react-native-picker/build.gradle
change these values.
compileSdkVersion 28
buildToolsVersion "28.0.3"
targetSdkVersion 28
I was able to build successfully after I did that.
edit android/build.gradle and after allprojects add code
subprojects { afterEvaluate {project -> if (project.hasProperty("android")) { android { compileSdkVersion 28 // have to match with build.gradle and app/build.gradle ones buildToolsVersion '28.0.3' // have to match with build.gradle and app/build.gradle ones variantFilter { variant -> def names = variant.flavors*.name // To check for a certain build type, use variant.buildType.name == "<buildType>" if (names.contains("reactNative51") || names.contains("reactNative55") || names.contains("reactNative56")) { // Gradle ignores any variants that satisfy the conditions above. setIgnore(true) } } } } } }
@crastyle code with format :
subprojects {
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28 // have to match with build.gradle and app/build.gradle ones
buildToolsVersion '28.0.3'
// have to match with build.gradle and app/build.gradle ones
variantFilter { variant ->
def names = variant.flavors*.name // To check for a certain build type, use variant.buildType.name == "<buildType>"
if (names.contains("reactNative51") || names.contains("reactNative55") || names.contains("reactNative56")) {
// Gradle ignores any variants that satisfy the conditions above.
setIgnore(true)
}
}
}
}
}
}```
FAILURE: Build failed with an exception.
React Native Environment Info: System: OS: Windows 7 CPU: (4) x64 Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz Memory: 7.77 GB / 15.88 GB Binaries: Node: 8.12.0 - F:\install\nodejs\node.EXE Yarn: 1.9.4 - C:\Users\XXXX\AppData\Roaming\npm\yarn.CMD npm: 6.4.1 - F:\install\nodejs\npm.CMD