Shopify / react-native-skia

High-performance React Native Graphics using Skia
https://shopify.github.io/react-native-skia
MIT License
6.99k stars 454 forks source link

Android Build Failed in MacOS #2631

Open Neelshah768 opened 2 months ago

Neelshah768 commented 2 months ago

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

  1. Why is the system reporting a minSdkVersion of 22 when it's set to 26 in the build.gradle file?
  2. Could there be another configuration file overriding these settings?
  3. Is this a known issue with the react-native-worklets-core library?

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

Virajmakwana commented 2 months ago

facing this same isuue

bobanminic96 commented 2 months ago

+1