terrylinla / react-native-sketch-canvas

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

Could not find method provided() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler #238

Open suriya619 opened 11 months ago

suriya619 commented 11 months ago

Hi, i am facing this issue.

package version: "@terrylinla/react-native-sketch-canvas": "^0.8.0",

android\app\build.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')

error: A problem occurred evaluating project ':@terrylinla_react-native-sketch-canvas'.

Could not find method provided() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Screenshot 2023-09-28 123334

Screenshot 2023-09-28 123413

nasy commented 9 months ago

Hey, I am having the same issue, did you find a solution?

nasy commented 9 months ago

Found a solution:

@terrylinla/react-native-sketch-canvas/android/build.gradle

dependencies {
    REMOVE -> provided "com.facebook.react:react-native:+"
    ADD -> implementation "com.facebook.react:react-native:+"
}