react-native-skia: Build failing for React-native 0.69.0
Hello, i am upgraded my react native and started to get this error, not sure whats the cause, thanks.
PS C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0> npm run android
> appname@0.0.9 android
> react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 2265 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
> Configure project :lottie-react-native
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the
Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :react-native-reanimated
Native libs debug enabled: true
Android gradle plugin: 7.1.1
Gradle: 7.3.3
building Reanimated2
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the
Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :shopify_react-native-skia
react-native-skia: node_modules/ found at: C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules
react-native-skia: React Native version: 69
react-native-skia: Is Source build: false
react-native-skia: Prebuilt dir: C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules\@shopify\react-native-skia\android\build/react-native-0*/jni
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
6 actionable tasks: 6 up-to-date
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules\@shopify\react-native-skia\android\build.gradle' line: 178
* What went wrong:
A problem occurred evaluating project ':shopify_react-native-skia'.
> Expected directory 'C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 22s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules\@shopify\react-native-skia\android\build.gradle' line: 178
* What went wrong:
A problem occurred evaluating project ':shopify_react-native-skia'.
> Expected directory 'C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 22s
at makeError (C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules\execa\index.js:174:9)
at C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules\react-native\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\Abdullah\Desktop\Programming\company\apps\AppName\AppName-0.69.0\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 17 (5 by maintainers)
@chrfalch is cmake 3.10.2 here is a hard requirement? is it possible to remove the line to make it more flexible?
supposedly AGP could download required cmake automatically. someone came across similar issues as well. not sure whether it’s license issue or what.
@thespacemanatee - this project will show you how to set up CMake appropriately: https://github.com/brentvatne/try-skia - notice the
eas-build-pre-install
hook in package.json andpre-install.sh
cc @Kudo / @chrfalch - we should coordinate on making this work out of the box on eas build, this was a bit of an oversight on our part
Could you try adding the following to the CMakeLists.txt file after line 55:
In the gradle-file found here under your project root: node_modules/@shopify/react-native-skia/android/build.gradle
@quicksilverr replace
def rnAAR = fileTree("${nodeModules}/react-native/android").matching({ it.include "**/**/*.aar" }).singleFile
with
def buildType = "debug"
tasks.all({ task ->
if (task.name == "buildCMakeRelease") {
buildType = "release"
}
})
def rnAarMatcher = "**/react-native/**/*${buildType}.aar"
def rnAAR = fileTree("${nodeModules}/react-native/android").matching({ it.include rnAarMatcher }).singleFile