flyskywhy / react-native-gcanvas

react native canvas based on gpu opengl glsl GCanvas -- A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎)
Apache License 2.0
215 stars 21 forks source link

Build crash in blank project #29

Closed antonkarytski closed 1 year ago

antonkarytski commented 2 years ago

Hello, first of all thanks for you work. It very useful It works fine in some projects that i create before. But if I try to create new project with expo-cli (bare) and then install lib, builds crashes

> Task :android:gcanvas_library:externalNativeBuildDebug
Build gcanvas_armeabi-v7a
ninja: Entering directory `D:\projects\draw-area-test1\my-app-2\node_modules\@flyskywhy\react-native-gcanvas\android\gcanvas_library\.cxx\cmake\debug\armeabi-v7a'
ninja: no work to do.
Build gcanvas_arm64-v8a
ninja: Entering directory `D:\projects\draw-area-test1\my-app-2\node_modules\@flyskywhy\react-native-gcanvas\android\gcanvas_library\.cxx\cmake\debug\arm64-v8a'
ninja: no work to do.

> Task :android:gcanvas_library:mergeDebugNativeLibs FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android:gcanvas_library:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > More than one file was found with OS independent path 'lib/armeabi-v7a/libfreetype.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/stud
io/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

Steps for reproduce:

flyskywhy commented 2 years ago

What's RN version in expo-cli 4.12.0? Since README.md said: @flyskywhy/react-native-gcanva Only support RN >= 0.62 as described in android/gcanvas_library/build.gradle to fix More than one file was found with OS independent path 'lib/armeabi-v7a/libfreetype.so'

antonkarytski commented 2 years ago

i tested with 0.64 and 0.66.1

flyskywhy commented 1 year ago

I init bare project with expo@48.0.5 then npm install @flyskywhy/react-native-gcanvas, everything is OK (only change 33 to 31 android/build.gradle for my network problem to download android platform 33).