react-native-skia: LINUX: Example app fails in Android
I just cloned the repo and tried to run the example app on Android. All the SDK and NDK setup are already done.
> Configure project :app
Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.
> Task :react-native-safe-area-context:compileDebugKotlin
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt: (50, 23): 'getter for uiImplementation: UIImplementation!' is deprecated. Deprecated in Java
> Task :react-native-screens:compileDebugKotlin
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/Screen.kt: (82, 22): 'constructor GuardedRunnable(ReactContext!)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt: (64, 28): 'setter for targetElevation: Float' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt: (120, 28): 'setter for targetElevation: Float' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt: (21, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt: (69, 47): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt: (70, 15): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt: (89, 34): 'getter for systemWindowInsetTop: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt: (238, 29): 'setColorFilter(Int, PorterDuff.Mode): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (65, 22): 'constructor GuardedRunnable(ReactContext!)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (92, 53): 'getter for systemUiVisibility: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (94, 49): 'SYSTEM_UI_FLAG_LIGHT_STATUS_BAR: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (96, 50): 'SYSTEM_UI_FLAG_LIGHT_STATUS_BAR: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (98, 23): 'setter for systemUiVisibility: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (113, 22): 'constructor GuardedRunnable(ReactContext!)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (122, 43): 'replaceSystemWindowInsets(Int, Int, Int, Int): WindowInsets' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (123, 47): 'getter for systemWindowInsetLeft: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (125, 47): 'getter for systemWindowInsetRight: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (126, 47): 'getter for systemWindowInsetBottom: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (145, 69): 'FLAG_FULLSCREEN: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (146, 71): 'FLAG_FORCE_NOT_FULLSCREEN: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (148, 69): 'FLAG_FORCE_NOT_FULLSCREEN: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt: (149, 71): 'FLAG_FULLSCREEN: Int' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt: (9, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt: (122, 47): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt: (123, 15): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt: (7, 51): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt: (17, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt: (18, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt: (7, 40): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt: (13, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt: (14, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt: (7, 43): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt: (13, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt: (14, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt: (7, 43): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt: (13, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt: (17, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt: (13, 5): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt: (22, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt: (27, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt: (7, 44): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt: (13, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt: (14, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt: (7, 47): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt: (13, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt: (14, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt: (5, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt: (7, 52): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt: (13, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt: (14, 25): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt: (13, 40): Parameter 'width' is never used
w: /home/niraj/Downloads/react-native-skia-main/example/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt: (13, 52): Parameter 'height' is never used
> Task :shopify_react-native-skia:compileDebugJavaWithJavac
> Task :app:compileDebugJavaWithJavac
> Task :shopify_react-native-skia:configureCMakeDebug FAILED
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
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
80 actionable tasks: 74 executed, 6 up-to-date
Note: /home/niraj/Downloads/react-native-skia-main/package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /home/niraj/Downloads/react-native-skia-main/example/android/app/src/debug/java/com/shopify/reactnative/skia/example/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shopify_react-native-skia:configureCMakeDebug'.
> C/C++: /home/niraj/Downloads/react-native-skia-main/package/android/CMakeLists.txt debug|armeabi-v7a : CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIBRARY
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
JSI_LIB
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
REACT_LIB
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
TURBOMODULES_LIB
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
* 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 46s
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 app:installDebug -PreactNativeDevServerPort=8081
Note: /home/niraj/Downloads/react-native-skia-main/package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /home/niraj/Downloads/react-native-skia-main/example/android/app/src/debug/java/com/shopify/reactnative/skia/example/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shopify_react-native-skia:configureCMakeDebug'.
> C/C++: /home/niraj/Downloads/react-native-skia-main/package/android/CMakeLists.txt debug|armeabi-v7a : CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIBRARY
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
JSI_LIB
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
REACT_LIB
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
TURBOMODULES_LIB
linked by target "reactskia" in directory /home/niraj/Downloads/react-native-skia-main/package/android
* 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 46s
at makeError (/home/niraj/Downloads/react-native-skia-main/example/node_modules/execa/index.js:174:9)
at /home/niraj/Downloads/react-native-skia-main/example/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/home/niraj/Downloads/react-native-skia-main/example/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/home/niraj/Downloads/react-native-skia-main/example/node_modules/@react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.
EDIT: After fixing the CMAKE error I am stuck in this now.
Build command failed.
Error while executing process /home/niraj/Android/Sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /home/niraj/Downloads/react-native-skia-main/package/android/.cxx/Debug/2g4x84k0/x86 reactskia}
ninja: Entering directory `/home/niraj/Downloads/react-native-skia-main/package/android/.cxx/Debug/2g4x84k0/x86'
ninja: error: '../../../../build/fbjni-0.2.2.aar/jni/x86/libfbjni.so', needed by '../../../../build/intermediates/cxx/Debug/2g4x84k0/obj/x86/libreactskia.so', missing and no known rule to make it
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 25
Closing from #391
Great - It also works well on iOS/Android on Mac - so there might be something related to the missing
libfbjni.so
library on Linux. Will investigate, looks like someone will have to switch to Linux for a little while 😃It could be that the first error would disappear after re-running the build. Could it be that the second error happened because you modified the CMake file? Maybe leaving it intact will fix the error?