rnc-archive / react-native-webgl

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

Android build failing: fr.greweb.rnwebgl does not exist #55

Closed tuomohopia closed 6 years ago

tuomohopia commented 6 years ago

I keep hitting a build error with react-native run-android command:

MainApplication.java:6: package fr.greweb.rnwebgl does not exist import fr.greweb.rnwebgl.RNWebGLPackage;

after installing the dependencies with yarn, I linked them via react-native link react-native-webgl and made the other necessary modifications.

Why does the import fail in finding the source for the import like this? What did I do wrong here?

tuomohopia commented 6 years ago

I think I managed to solve it by changing

settings.gradle:

- include ':react-native-webgl'
- project(':react-native-webgl').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webgl/android')
+ include ':RNWebGL'
+ project(':RNWebGL').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webgl/android')

app/build.gradle:

dependencies {
...
+ compile project(':RNWebGL')
}