react-native-skia icon indicating copy to clipboard operation
react-native-skia copied to clipboard

Android Build Failed in MacOS

Open Neelshah768 opened this issue 1 year ago • 2 comments

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

Neelshah768 avatar Sep 12 '24 06:09 Neelshah768

facing this same isuue

Virajmakwana avatar Sep 13 '24 06:09 Virajmakwana

+1

bobanminic96 avatar Sep 19 '24 15:09 bobanminic96

Thank you for reporting this could you provide a small project where I could reproduce the issue?

wcandillon avatar Jan 09 '25 11:01 wcandillon

+1

EsdrasAlbino avatar Apr 09 '25 05:04 EsdrasAlbino

Please provide me with a repository where I could reproduce the issue and I will reopen/fix this asap

wcandillon avatar Apr 09 '25 09:04 wcandillon