Closed kashishgrover closed 3 years ago
Inside your node_modules folder, find react-native-otp-verify --> android --> build.gradle. It will look like this:
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
}
...
repositories {
mavenCentral()
google() // <------ Remove this
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion
: project.hasProperty('playServiceVersion') ? project.playServiceVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
implementation 'com.facebook.react:react-native:+'
implementation "com.google.android.gms:play-services-auth:$googlePlayServicesVersion"
}
Next, it will probably prompt you about implementation. So change both of those to compile instead. However, I still don't think this will work for you. It's better not to change this file and update your build tools to 3.1.4, then everything will work.
@Dror-Bar thanks for that, but I still don't think it would work. In the dependencies it uses 'implementation' keyword which is not compatible with our current gradle version. For now, I will simply try and implement the java files of this project in my project as a local dependency. Because we cannot upgrade react native right now, when we do, I will add this back as it is
I thinks this has to do with build gradle version as old gradle version does not have google() (Not an expert so might be wrong). Check the comment here it may solve your issue - #https://github.com/react-native-community/react-native-svg/issues/584#issuecomment-359260761
@faizalshap yeah it probably does have to do with that. I wonder how certain packages are not dependent on the gradle versions. Is that somehow possible here as well?
Not sure i'll have to look into it once i get some freetime...
I tried to integrate this with our React Native project and I got the following error
We currently use React Native v0.52 in our app so yeah we are pretty far behind. Does that mean I cannot use this until we upgrade React Native? Are these two things related?