alibaba / GCanvas

A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎) https://alibaba.github.io/GCanvas
Apache License 2.0
1.89k stars 208 forks source link

Build fails on iOS and Android #31

Closed jordaaash closed 6 years ago

jordaaash commented 6 years ago

iOS

Build fails with

./node_modules/react-native-gcanvas/ios/RCTGCanvasView.h:23:9: 'GCanvas/GCanvasViewProtocol.h' file not found

Following the latest docs (and using react-native-gcanvas v 0.0.5 and gcanvas v 0.0.7), there is no ./node_modules/react-native-gcanvas/ios/GCanvas.framework file (after running react-native link react-native-gcanvas).

Android

Build fails with

Extension with name 'groups' does not exist. Currently registered extension names: [ext]

Relevant line is group = rootProject.extensions.groups.Bridge in ./node_modules/react-native-gcanvas/android/build.gradle. Gradle version is 3.1.0.

jwxbond commented 6 years ago

@jordansexton thanks for following up. About iOS react-native-gcanvas have a new update to 0.0.6, and please try it again.

fREEDtICE commented 6 years ago

@jordansexton Please use our aar maven version. Please check our document below: https://alibaba.github.io/GCanvas/docs/Integrate%20GCanvas%20on%20ReactNative.html

jordaaash commented 6 years ago

@jwxbond Thank you! I was able to get the iOS build finished with 0.0.6 which has the required file and following the iOS steps from the documentation.

@fREEDtICE I followed all the Android steps in that document before arriving at that error, but I'll try again from scratch using the latest version.

jordaaash commented 6 years ago

The Android section of the RN setup seem to be missing a few things. These lines all throw errors:

https://github.com/alibaba/GCanvas/blob/ccba24603861d47f5c72b9f223b07d018936c36f/GCanvas/bridges/react-native-bridge/react-native-gcanvas/android/build.gradle#L3-L12

https://github.com/alibaba/GCanvas/blob/ccba24603861d47f5c72b9f223b07d018936c36f/GCanvas/bridges/react-native-bridge/react-native-gcanvas/android/build.gradle#L28-L31

I'm guessing the issue is that these libraries

https://github.com/alibaba/GCanvas/tree/master/GCanvas/android

are not being included by the react-native-gcanvas or gcanvas.js npm packages.

Additionally, whatever setup config is supposed to be there for rootProject.extensions.<etc> to be defined won't be there for existing RN projects.

fREEDtICE commented 6 years ago

Hi, @jordansexton, RN projects have their own root project if created by "react-native init" command. You can check setting.gradle, it re-defined rootProject.

If you build GCanvas RN bridge under GCanvas Repo Project, it should work.

We will delete Android source code in the react-native-gcanvas npm package, replace it with aar package later. Right now please use our aar dependency for compiling. Thanks.

jordaaash commented 6 years ago

Unfortunately building it inside the repo project without other documentation on installation as a library in my project isn't a practical option. I also wasn't able to get substantially better performance on iOS than just using an HTML canvas in a WebView.

I'll reevaluate when there's more documentation and tests, but thank you for your help and your work on this. I think it's a really interesting project and I'm excited to see how it progresses.

Micjoyce commented 6 years ago

Now, what are some ways to make android work? I tried to run the react native example below the bridge and it dons't work.

IvenOne commented 6 years ago

Any solutions?

nvwebm commented 5 years ago

What about it?

goodgoodbigbig commented 5 years ago

Any solutions?

Mystify76 commented 4 years ago

Any progress on this issue? I am getting a problem when trying to run on RN android with rootProject.extensions.sdks.Support

likern commented 4 years ago

Any progress on this issue? I am getting a problem when trying to run on RN android with rootProject.extensions.sdks.Support

Have you finally solved this issue? I've recently came across with this error and can't find a way to fix or avoid it.

TryAgainLater commented 4 years ago

Any progress on this issue? I am getting a problem when trying to run on RN android with rootProject.extensions.sdks.Support

Have you finally solved this issue? I've recently came across with this error and can't find a way to fix or avoid it.

Same for me: A problem occurred evaluating project ':react-native-gcanvas'. Extension with name 'sdks' does not exist.

arturz commented 4 years ago

Problem still occurs.

uniquecolin commented 4 years ago

RN bridge has been removed

flyskywhy commented 3 years ago

@jordansexton @Micjoyce @IvenOne @nvwebm @goodgoodbigbig @Mystify76 @likern @TryAgainLater @arturz @uniquecolin

Since Alibaba feat: delete weex bridge & reactive bridge, here comes the @flyskywhy/react-native-gcanvas npm package.

After months work, @flyskywhy/react-native-gcanvas runs well on Android and iOS, fix several bugs and add feat: support drawImage() from require('some.png') on Android, iOS and Web described in Changelog.md, refactor with the detailed Example As Usage in README.md.

With Performance Test Result, and Convenient With Browser-like canvas APIs with the easily <canvas/> ported example react-native-particles-bg runs on Android, iOS and Web, @flyskywhy/react-native-gcanvas is the best choice for now :yum:

arthare commented 3 years ago

@flyskywhy Dude! Awesome! I got it working in minutes, and it's way faster than the webview+canvas solution I had before. Plus, you know, it compiles on android :-)

devansh-nigam commented 2 years ago

The issue still persists,

A problem occurred evaluating project ':react-native-gcanvas'.
> Extension with name 'sdks' does not exist. Currently registered extension names: [ext, _internalAndroidGradlePluginDependencyCheckerRegistered]
danbudworthmead commented 2 years ago

The issue still persists,

A problem occurred evaluating project ':react-native-gcanvas'.
> Extension with name 'sdks' does not exist. Currently registered extension names: [ext, _internalAndroidGradlePluginDependencyCheckerRegistered]

did you ever find a fix?

UmarLE commented 1 year ago

The issue still persists,

A problem occurred evaluating project ':react-native-gcanvas'.
> Extension with name 'sdks' does not exist. Currently registered extension names: [ext, _internalAndroidGradlePluginDependencyCheckerRegistered]

did anybody find solution for it.