nitish24p / react-native-upi

A tiny module for Adding payments via UPI in your react native apps ❤️
MIT License
77 stars 30 forks source link

i am facing this issue during build please help me it is very urgent #47

Closed ritikmatta closed 1 year ago

ritikmatta commented 1 year ago

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

ritikmatta commented 1 year ago

can anyone help me to implement this i stuck there from many days but did not find any solution.i would appreciate your help.

nitish24p commented 1 year ago

can you try this

dependencies {
    compile 'com.facebook.react:react-native:+' // OLD
}
dependencies {
    implementation 'com.facebook.react:react-native:+' // Replace To
}
ritikmatta commented 1 year ago

I tried but able to make a build

ritikmatta commented 1 year ago

please help me

nitish24p commented 1 year ago

Please do not put any of your personal information as a comment here 😄

nitish24p commented 1 year ago

Did you try the change, if it didnt work can you send me some code of the build.gradle file so i can help

ritikmatta commented 1 year ago

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript { ext { buildToolsVersion = "33.0.0" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33

    // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
    ndkVersion = "23.1.7779620"
}
repositories {
    google()
    mavenCentral()
}
dependencies {
    classpath("com.android.tools.build:gradle:7.3.1")
    classpath("com.facebook.react:react-native-gradle-plugin")
}

}

itsmesubham commented 1 year ago

@ritikmatta Replace compile with implementation in node_modules> react-native-upi > android > build.gradle

getsettalk commented 1 year ago

just put this into android/app/build.gradle dependencies { implementation 'com.facebook.react:react-native:' }

it's works for me

nitish24p commented 1 year ago

Update to the latest version this should get fixed..