Open axolotl0212 opened 1 year ago
/android/build.gradle
import com.android.build.gradle.BaseExtension
allprojects {
// ...
getSubprojects().each {
Project currentProject = it
currentProject.afterEvaluate {
try {
BaseExtension android = currentProject.extensions.getByName('android')
android.compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
} catch(e) {
}
}
}
}
Cannot build Android app after upgrading to 0.17.0.
Lambda expression (Java 8) is used in Android source file
https://github.com/RonRadtke/react-native-blob-util/blob/977a5a908116ae8afa8b7d59efae4ffde81aaa56/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilPackage.java#L28
However
compileOptions
is not explicitly specified inbuild.gradle
, leading to compilation errorRelated issue in other repo: https://github.com/OneSignal/react-native-onesignal/issues/1235
Suggest adding the
compileOptions
tobuild.gradle
to enable desugaring, as follow: