Closed grigio closed 1 year ago
Hi again, @grigio - you shouldn't need to build the example package - it requires you to also setup and build the Skia binaries. Install the npm package from the npm repository and all of this will work automatically for you. The example project is mainly for library development.
Ok, but I'd like to test and build the example app APK on Linux, how can I do it?
I changed the example app to make it a normal app but I still have the same errors
from
"@shopify/react-native-skia": "link:../package/",
to
"@shopify/react-native-skia": "v0.1.158 alpha",
Hi, @grigio - I would suggest you try the following steps to get started:
If you have problems in step 2 you are welcome to ask for help here - if you have problems in step 1 you should visit the react-native repo / stack overflow to get help and advise.
Thanks @chrfalch I followed that path and it worked, I've seen many open bug about an official Android apk to test the example app but every time I test React Native and dependencies I've esoteric errors
https://github.com/grigio/-react-native-skia-example-apk
Are there useful changes I can push to the official example app to fix it ? I'd like to build a working apk from the official example
Hello, i am having same issue all of sudden, I am not running example folder.
``
Task :shopify_react-native-skia:buildCMakeRelWithDebInfo[armeabi-v7a] C/C++: ninja: Entering directory `C:\Users\Abdullah\Desktop\Programming\company\apps\Chappie\Chappie-0.70.6\Chappie\node_modules\@shopify\react-native-skia\android.cxx\RelWithDebInfo\5d5w714g\armeabi-v7a' C/C++: C:/Users/Abdullah/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: fatal error: ........\build\intermediates\cxx\RelWithDebInfo\5d5w714g\obj\armeabi-v7a\libreactskia.so: open: No such file or directory C/C++: clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Task :shopify_react-native-skia:buildCMakeRelWithDebInfo[armeabi-v7a] FAILED w: Detected multiple Kotlin daemon sessions at build\kotlin\sessions
FAILURE: Build completed with 2 failures.
What went wrong: Execution failed for task ':shopify_react-native-skia:buildCMakeRelWithDebInfo[armeabi-v7a]'.
Build command failed. Error while executing process C:\Users\Abdullah\AppData\Local\Android\sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C C:\Users\Abdullah\Desktop\Programming\company\apps\Chappie\Chappie-0.70.6\Chappie\node_modules\@shopify\react-native-skia\android.cxx\RelWithDebInfo\5d5w714g\armeabi-v7a reactskia}
ninja: Entering directory `C:\Users\Abdullah\Desktop\Programming\company\apps\Chappie\Chappie-0.70.6\Chappie\node_modules\@shopify\react-native-skia\android.cxx\RelWithDebInfo\5d5w714g\armeabi-v7a' [1/14] Building CXX object CMakeFiles/reactskia.dir/cpp/rnskia-android/SkiaOpenGLRenderer.cpp.o [2/14] Building CXX object CMakeFiles/reactskia.dir/cpp/jni/JniPlatformContext.cpp.o [3/14] Building CXX object CMakeFiles/reactskia.dir/cpp/jsi/JsiValue.cpp.o [4/14] Building CXX object CMakeFiles/reactskia.dir/cpp/jsi/JsiHostObject.cpp.o [5/14] Building CXX object CMakeFiles/reactskia.dir/cpp/rnskia/RNSkDispatchQueue.cpp.o [6/14] Building CXX object CMakeFiles/reactskia.dir/cpp/api/third_party/CSSColorParser.cpp.o [7/14] Building CXX object CMakeFiles/reactskia.dir/cpp/rnskia/dom/base/DrawingContext.cpp.o [8/14] Building CXX object CMakeFiles/reactskia.dir/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp.o [9/14] Building CXX object CMakeFiles/reactskia.dir/cpp/jni/JniSkiaManager.cpp.o [10/14] Building CXX object CMakeFiles/reactskia.dir/cpp/rnskia/RNSkDomView.cpp.o [11/14] Building CXX object CMakeFiles/reactskia.dir/cpp/rnskia/RNSkJsView.cpp.o [12/14] Building CXX object CMakeFiles/reactskia.dir/cpp/jni/JniLoad.cpp.o [13/14] Building CXX object CMakeFiles/reactskia.dir/cpp/rnskia/RNSkManager.cpp.o [14/14] Linking CXX shared library ........\build\intermediates\cxx\RelWithDebInfo\5d5w714g\obj\armeabi-v7a\libreactskia.so FAILED: ../../../../build/intermediates/cxx/RelWithDebInfo/5d5w714g/obj/armeabi-v7a/libreactskia.so cmd.exe /C "cd . && C:\Users\Abdullah\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi21 --gcc-toolchain=C:/Users/Abdullah/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/Abdullah/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -fexceptions -frtti -std=c++1y -DONANDROID -DSK_GL -DSK_BUILD_FOR_ANDROID -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID -O2 -g -DNDEBUG -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libreactskia.so -o ........\build\intermediates\cxx\RelWithDebInfo\5d5w714g\obj\armeabi-v7a\libreactskia.so CMakeFiles/reactskia.dir/cpp/jni/JniLoad.cpp.o CMakeFiles/reactskia.dir/cpp/jni/JniSkiaManager.cpp.o CMakeFiles/reactskia.dir/cpp/jni/JniPlatformContext.cpp.o CMakeFiles/reactskia.dir/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp.o CMakeFiles/reactskia.dir/cpp/rnskia-android/SkiaOpenGLRenderer.cpp.o CMakeFiles/reactskia.dir/cpp/jsi/JsiHostObject.cpp.o CMakeFiles/reactskia.dir/cpp/jsi/JsiValue.cpp.o CMakeFiles/reactskia.dir/cpp/rnskia/RNSkManager.cpp.o CMakeFiles/reactskia.dir/cpp/rnskia/RNSkJsView.cpp.o CMakeFiles/reactskia.dir/cpp/rnskia/RNSkDomView.cpp.o CMakeFiles/reactskia.dir/cpp/rnskia/RNSkDispatchQueue.cpp.o CMakeFiles/reactskia.dir/cpp/rnskia/dom/base/DrawingContext.cpp.o CMakeFiles/reactskia.dir/cpp/api/third_party/CSSColorParser.cpp.o -LC:/Users/Abdullah/Desktop/Programming/company/apps/Chappie/Chappie-0.70.6/Chappie/node_modules/@shopify/react-native-skia/android/../libs/android/armeabi-v7a -LC:/Users/Abdullah/Desktop/Programming/company/apps/Chappie/Chappie-0.70.6/Chappie/node_modules/@shopify/react-native-skia/android/build/fbjni-0.2.2.aar/jni/armeabi-v7a -LC:/Users/Abdullah/Desktop/Programming/company/apps/Chappie/Chappie-0.70.6/Chappie/node_modules/@shopify/react-native-skia/android/build/react-native-0.70.6-debug.aar/jni/armeabi-v7a -llog -lfbjni -lreact_nativemodule_core -ljsi -lturbomodulejsijni ../../../../../libs/android/armeabi-v7a/libsvg.a ../../../../../libs/android/armeabi-v7a/libskshaper.a ../../../../../libs/android/armeabi-v7a/libskia.a -ljnigraphics -lGLESv2 -lEGL -landroid -latomic -lm && cd ." C:/Users/Abdullah/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: fatal error: ........\build\intermediates\cxx\RelWithDebInfo\5d5w714g\obj\armeabi-v7a\libreactskia.so: open: No such file or directory clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
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.
What went wrong: java.lang.StackOverflowError (no error message)
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
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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 5m 23s 628 actionable tasks: 599 executed, 29 up-to-date ``
Description
I can't produce the android binary
Version
v0.1.158-alpha
Steps to reproduce
Snack, code example, screenshot, or link to a repository
.