React 0.56.0
this error ocorred after 'npm install' and 'npm run android'.
it is my build.gradle 'app'
apply plugin: "com.android.application"
apply plugin: 'io.fabric'import com.android.build.OutputFile
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
project.ext.react = [
entryFile: "index.js"
]apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-sentry/sentry.gradle"def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersiondefaultConfig { applicationId "br.com.smartsapp.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57" versionCode 153 versionName "1.4.27" vectorDrawables.useSupportLibrary = true resConfigs "pt" aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false multiDexEnabled true ndk { abiFilters "armeabi-v7a", "x86" } } signingConfigs { release { if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { storeFile file(MYAPP_RELEASE_STORE_FILE) storePassword MYAPP_RELEASE_STORE_PASSWORD keyAlias MYAPP_RELEASE_KEY_ALIAS keyPassword MYAPP_RELEASE_KEY_PASSWORD } } } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false include "armeabi-v7a", "x86" } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildTypes { release { signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } applicationVariants.all { variant -> variant.outputs.each { output -> def versionCodes = ["armeabi-v7a":1, "x86":2] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { output.versionCodeOverride = versionCodes.get(abi) * 1048576 + defaultConfig.versionCode } } }}
dependencies {
compile project(':react-native-view-overflow')
implementation(project(':react-native-onesignal')) {
exclude group: 'com.android.support'
exclude group: 'com.google.android.gms'
exclude group: 'com.google.firebase'
}
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms'
}
implementation 'com.google.android.gms:play-services-base:12.0.1'
implementation 'com.google.android.gms:play-services-basement:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-tasks:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation project(':react-native-vector-icons')
implementation project(':react-native-system-setting')
implementation project(':react-native-svg')
implementation project(':react-native-rsa-native')
// implementation project(':react-native-onesignal')
implementation project(':react-native-image-resizer')
implementation project(':react-native-image-picker')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-fs')
implementation project(':react-native-fbsdk')
implementation project(':react-native-camera')
implementation project(':react-native-exception-handler')
implementation project(':react-native-sentry')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:27.+"
implementation 'com.android.support:recyclerview-v7:27.+'
implementation "com.facebook.react:react-native:+"
implementation "com.android.support:support-annotations:27.+"
implementation "com.android.support:exifinterface:27.+"
implementation "com.android.support:multidex:1.0.0"
implementation "com.google.android.gms:play-services-vision:16.2.0"implementation project(':react-native-navigation') implementation project(':react-native-vector-icons') implementation project(':react-native-rsa-native') implementation project(':react-native-image-picker') implementation project(':react-native-image-resizer') implementation project(':react-native-fs') implementation project(':react-native-fbsdk') implementation project(':react-native-svg') implementation (project(':react-native-camera')) { exclude group: "com.google.android.gms" exclude group: "com.android.support" } implementation project(':react-native-system-setting')}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
Error:
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[26.0.
0, 27.99.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.Dependency failing: com.onesignal:OneSignal:3.12.2 -> com.android.support:cardview-v7@[26.0.0, 27.99.99], but cardview-v
7 version was 27.1.1.The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'react' which depends onto com.onesignal:[email protected]
-- Project 'app' depends on project 'react' which depends onto com.facebook.android:[email protected]For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
Please open this in the correct repository (React Native SDK) https://github.com/OneSignal/react-native-onesignal
after updating one signal getting this error
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[26.0.
0, 27.99.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.onesignal:OneSignal:3.12.2 -> com.android.support:cardview-v7@[26.0.0, 27.99.99], but cardview-v
7 version was 27.1.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'react' which depends onto com.android.support:[email protected]
-- Project 'app' depends on project 'react' which depends onto com.onesignal:[email protected]
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
Same issue here
@ridhuandaud i solve this issue by adding this in "android/app/build.gradle" file.
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true <------- add this line
@BabarMemon where do you put this line?
@BabarMemon i put on the end of the file. It's worked! Thanks!
please how did you put the line ,is it as a string or how ? I m having same issue . Thanks

@tayoraph
Most helpful comment
@ridhuandaud i solve this issue by adding this in "android/app/build.gradle" file.
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true <------- add this line