-
Notifications
You must be signed in to change notification settings - Fork 130
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
Build Error on Android Devices #14
Comments
Met with the exact same problem, couldn't find solutions anywhere.. Have you tried looking into the react-native-os library gradle file? I'm not sure what to change but I think it might be because of the specified sdk/build versions in the library |
@ochikov Hey, I think I found a fix for this. I'm not sure why but the safeExtGet didn't work for me. So i commented them out, and did the normal declaration for the exact same sdk versions. Here's how my code looks like. Hopefully it works for you too.
|
Thank you. I will try it.
…On Fri, 26 Jul 2019 at 17:49, Marcus ***@***.***> wrote:
@ochikov <https://github.com/ochikov> Hey, I think I found a fix for
this. I'm not sure why but the safeExtGet didn't work for me. So i
commented them out, and did the normal declaration for the exact same sdk
versions. Here's how my code looks like. Hopefully it works for you too.
`/*
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
*/
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
apply plugin: 'com.android.library'
android {
//safeExtGet('compileSdkVersion', 23)
//safeExtGet('buildToolsVersion', '23.0.1')
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
//safeExtGet('minSdkVersion', 16)
//safeExtGet('targetSdkVersion', 22)
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "0.2.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// needed for square/okio#58
lintOptions {
abortOnError false
warning 'InvalidPackage'
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.facebook.react:react-native:+'
}
`
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=ADHVGETT2LUJJ3RRZP2Y4L3QBMFGRA5CNFSM4IGDJEAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD242QVQ#issuecomment-515483734>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADHVGET4ERXKLDSQ6BHDZQDQBMFGRANCNFSM4IGDJEAA>
.
|
edit: Thanks, that worked. |
file '\node_modules\react-native-os\android\build.gradle' line: 51
change to
|
Hello,
I am getting build error with the following error:
My gradle configuration is:
The text was updated successfully, but these errors were encountered: