Issue While Building the app after installation
Execution failed for task ':tasks'.
Could not create task ':react-native-share-menu:compileDebugJavaWithJavac'. In order to compile Java 9+ source, please set compileSdkVersion to 30 or above
While my Configurations are : ext { buildToolsVersion = "33.0.0" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
I have this too. I'm guessing that it's because the published version (6) is out of sync with master which is set to compile using 31, as opposed to 29.
I'm guessing the easiest solution is to build locally? Not ideal, but it's what I'm looking to do in order to work around this.
(EDITED)
I was running into the same problem, but this SO answer fixed it for me: https://stackoverflow.com/a/76662951/1255553 🙂
My android/build.grade now looks like this:
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
kotlinVersion = "1.8.0"
}
// Start: needed to fix build issue with react-native-share-menu (see https://github.com/Expensify/react-native-share-menu/issues/277)
subprojects { subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}
// End