Android Build Failed in MacOS
SDK Version Mismatch in React Native Project
Description
After installing the package and attempting to run yarn dev, I'm encountering an error related to SDK version mismatch. The error message suggests a discrepancy between the user's minSdkVersion and the library's build version.
Error Message
C/C++: /Users/promethean/LivCast/livcast-app/node_modules/@shopify/react-native-skia/android/CMakeLists.txt debug|arm64-v8a : com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/fabricjni. Rejected the following libraries:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
998 actionable tasks: 35 executed, 963 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shopify_react-native-skia:configureCMakeDebug[arm64-v8a]'.
> [CXX1214] /Users/promethean/LivCast/livcast-app/node_modules/@shopify/react-native-skia/android/CMakeLists.txt debug|arm64-v8a : User has minSdkVersion 22 but library was built for 23 [//ReactAndroid/fabricjni]
Project Configuration
My build.gradle file includes the following configuration:
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 26
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
}
Expected Behavior
Given that my minSdkVersion is set to 26, which is higher than both the error-mentioned versions (22 and 23), I expected the project to build without SDK version conflicts.
Actual Behavior
The build process fails, reporting a mismatch between the user's SDK version (reportedly 22) and the library's build version (23), despite the build.gradle file specifying a minSdkVersion of 26.
Questions
- Why is the system reporting a
minSdkVersionof 22 when it's set to 26 in thebuild.gradlefile? - Could there be another configuration file overriding these settings?
- Is this a known issue with the
react-native-worklets-corelibrary?
Environment
new Architecture "react": "18.2.0", "react-native": "0.74.5", "@shopify/react-native-skia": "1.3.11" "node-version": 20.12.2 OS: macOS(14.6.1)
Steps to Reproduce
Install the package (@shopify/react-native-skia) Run yarn dev
facing this same isuue
+1
Thank you for reporting this could you provide a small project where I could reproduce the issue?
+1
Please provide me with a repository where I could reproduce the issue and I will reopen/fix this asap