terrylinla / react-native-sketch-canvas

A React Native component for drawing by touching on both iOS and Android.
MIT License
693 stars 450 forks source link

Unable to find module with Gradle path ':@terrylinla/react-native-sketch-canvas' (needed by module 'app'.) #52

Closed aaeronn closed 6 years ago

aaeronn commented 6 years ago

I do not know why this issue is coming when I open android studio.

But when I run the app it works fine. Why am I seeing this error ??

ShaunLWM commented 6 years ago

Android Studio is unable to resolve file path with / for in the include statement. Replace the module with this line in your project settings.gradle

include ':@terrylinla_react-native-sketch-canvas'
project(':@terrylinla_react-native-sketch-canvas').projectDir = new File(rootProject.projectDir, '../node_modules/@terrylinla/react-native-sketch-canvas/android')
aaeronn commented 6 years ago

I have same code in my project setting.gradle. I dont know why I am getting this error

ShaunLWM commented 6 years ago

Have you changed the / to _?

Use :@terrylinla_react-native-sketch-canvas and not :@terrylinla/react-native-sketch-canvas

terrylinla commented 6 years ago

In settings.gradle, you may also need to change

compile project(':@terrylinla/react-native-sketch-canvas')

to

compile project(':@terrylinla_react-native-sketch-canvas')
aaeronn commented 6 years ago

Yes changing "/" to "_" in settings.gradle and build.gradle worked for me.. I guess it is issue with android studio 3

terrylinla commented 6 years ago

Close this issue. Feel free to re-open if you still have same problem!

vietmobilefolk commented 5 years ago

Still got the problem after change "/" to "_" in settings.gradle and app/build.gradle