rnc-archive / react-native-webgl

DEPRECATED: use expo-gl – Implements WebGL for react-native
295 stars 73 forks source link

"Invariant Violation: Native component for 'RNWebGLView' does not exist" #54

Closed robertjuh closed 4 years ago

robertjuh commented 6 years ago

react-native-cli: 2.0.1 react-native: 0.55.1

Device: Samsung galaxy s8

I don't seem to be able to manually change the required files as displayed in: https://user-images.githubusercontent.com/211411/30113286-81388ea4-9314-11e7-9856-933c749c9364.png (source: https://github.com/react-community/react-native-webgl/issues/6)

As they seem to be within xcodeproj files, and i can't access them without xCode because i dont have that.

robertjuh commented 6 years ago
on iOS:

in your XCode project,

    if it not there, add libRNWebGL.a in the Linked Libraries of your project target (and remove the potential libGPUImage.a if it not needed). There is a "bug" with react-native link.

Either "libRNWebGL.a" nor "libGPUImage.a" could be found in any of the IOS folders from the react-native package so it's not even possible for me to manually add them

AndyEsser commented 6 years ago

If you using a Samsung Galaxy S8, why are you looking at the iOS XCode Project?

I had some issues getting it to work on Android, with the very same error message (posted an issue a few days before you).

Ended up having to go into Android Studio to do the build, or invoking: android/gradlew installDebug.

robertjuh commented 6 years ago

It works now! in the local.properties android studio inserted these lines: ndk.dir=C\:\Users\robert\AppData\Local\Android\Sdk\ndk-bundle sdk.dir=C\:\Users\robert\AppData\Local\Android\Sdk

I replaced them with these and now it works: ndk.dir=C:/Users/robert/AppData/Local/Android/Sdk/ndk-bundle sdk.dir=C:/Users/robert/AppData/Local/Android/Sdk

raideltorres commented 6 years ago

hi @robertjuh and what about IOS, how did you solved the issue? I'm having exactly the same problem

robertjuh commented 6 years ago

i dont know i dont have an apple computer and nearly no experience with it, all i could say is maybe somewhere in the steps of the guides you missed a small detail. Are you building/deploying the project with xcode?

rockmandash commented 6 years ago

I have the same problem, but I'm using create-react-native-app, I have no idea how to solve this problem where I'm in expo environment.

robertjuh commented 5 years ago

i'm not sure if expo supports RNwebgl. You could try to check out 'expo-three', it's kind of a threejs support by expo