Open rakibhssn opened 1 year ago
Same issue I am facing
Had the same issue, my fix was to change build configs for Android inside of node_modules/react-native-google-pay/android /build.gradle . It depends on your SDK version. for example for latest version
` android { compileSdkVersion 34 buildToolsVersion = "34.0.0"
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}`
Don't forget you should do it each time then you decide to delete the node_modules. It's annoying, but u can create the patch with patch-package
:)
Had the same issue, my fix was to change build configs for Android inside of node_modules/react-native-google-pay/android /build.gradle . It depends on your SDK version. for example for latest version
fixed the formatting:
android {
compileSdkVersion 34
buildToolsVersion = "34.0.0"
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}
Step 1 fork this repo Step 2 convert to android json in build.gradle file
android { compileSdkVersion 34 buildToolsVersion = "34.0.0"
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}
Step 3 copy in your project repo
"react-native-google-pay": "git@github.com:yourusername/react-native-google-pay.git",
Getting this error to build app and also shows below error
GooglePay.setEnvironment(GooglePay.ENVIRONMENT_TEST)
this one shows Cannot read property setEnvironment of null