Closed Connor-Y-Evenset closed 5 years ago
I also have this issue, but my compileSdkVersion and targetSdkVersion are already set at 28. What do you have for buildToolsVersion and supportLibVersion?
Thank you!
I don't recall changing any of the other options here. For reference my forground service build.gradle file is as follows
apply plugin: 'com.android.library'
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.facebook.react:react-native:+'
api "com.android.support:appcompat-v7:${safeExtGet('supportLibVersion', '27.1.1')}"
}
It worked, thank you! My mistake is that I was modifying my own apps' build.gradle, not the correct one.
One thing to be careful of here is that this will only work for your local installation of the module. If you install/build on a different device the changes will not persist.
This should have been resolved by https://github.com/voximplant/react-native-foreground-service/pull/5
Attempting to build a release Android APK while using this library results in an error when compiling.
Compilation made using
./android/gradlew assembleRelease
This issue appears to be resolved by setting
compileSdkVersion 28
andtargetSdkVersion 28
inside theandroid/build.gradle
file. I am not sure if there are any other side effects to this change however.Edit: Noticed afterwards that there is a PR for this already open. Is there any intent to merge this @YuliaGrigorieva ?