React-native-onesignal: Updating version from 3.1.2 to 3.1.3 : Could not resolve all dependencies for configuration

Created on 29 Mar 2018  路  9Comments  路  Source: OneSignal/react-native-onesignal

Hello,

Since I updated the version to 3.1.3 I'm not able anymore to compile, I get this error message

A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-onesignal'.
Could not resolve all dependencies for configuration ':react-native-onesignal:_debugPublishCopy'.
Could not find any version that matches com.android.support:support-v4:[26.0.0, 27.2.0).
Versions that do not match:
26.0.0-alpha1
25.3.1
25.3.0
25.2.0
25.1.1
+ 32 more
Searched in the following locations:
file:/Users/vsts/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/maven-metadata.xml
file:/Users/vsts/agent/2.131.0/work/1/s/project/android/sdk-manager/com/android/support/support-v4/maven-metadata.xml
file:/Users/vsts/agent/2.131.0/work/1/s/project/android/sdk-manager/com/android/support/support-v4/
Required by:
myBjj:react-native-onesignal:unspecified > com.onesignal:OneSignal:3.8.3
Could not find any version that matches com.android.support:customtabs:[26.0.0, 27.2.0).
Versions that do not match:
26.0.0-alpha1
25.3.1
25.3.0
25.2.0
25.1.1
+ 19 more
Searched in the following locations:
file:/Users/vsts/Library/Android/sdk/extras/android/m2repository/com/android/support/customtabs/maven-metadata.xml
file:/Users/vsts/agent/2.131.0/work/1/s/project/android/sdk-manager/com/android/support/customtabs/maven-metadata.xml
file:/Users/vsts/agent/2.131.0/work/1/s/project/android/sdk-manager/com/android/support/customtabs/
Required by:
myBjj:react-native-onesignal:unspecified > com.onesignal:OneSignal:3.8.3

I'm using :
compileSdkVersion : 23
buildToolsVersion 23.0.1

I tried also to install the sdk tools 26.0.0 & 27.2.0 but it does not work.
image

I would like to not have to upgrade my compileSdkVersion, Is it possible ?

Most helpful comment

@nikasvan you can temporarily restrict the react-native-onesignal version in package.json to 3.1.2.

All 9 comments

Same Issue here

i think its because of this commit :
https://github.com/geektimecoil/react-native-onesignal/commit/2d94cfe65913c96ecb0548beb85d6fae6020e3c0
the minimum sdk version has been changed!

@Kisepro Thanks for reporting, we were too aggressive on updating the build.gradle setting in the 3.1.3 SDK update, as you noted @HessiPard.

I just created a new react project with react-native init found it to be defaulting to some extremely old build.gradle settings!
compileSdkVersion 23, BuildToolsVersion "23.0.1", and targetSdkVersion 22
Even with the latest react-native-cli: 2.0.1 and react-native: 0.54.3 versions. This is also noted on this open react issue https://github.com/facebook/react-native/issues/18095 which is going to be an issue for submitting apps the Google Play Store come August 2018.

Since react is designed for these older Android setting we are going to release another update soon to use these same react native defaults in this plugin. We are also going to do a bit a future proofing to allow overriding like this.

Your projects android/build.gradle

ext {
    compileSdkVersion = 23
    buildToolsVersion = '23.0.1'
}

OneSignal's build.gradle

android {
   // Reads your project's settings
   compileSdkVersion rootProject.ext.compileSdkVersion
   buildToolsVersion rootProject.ext.buildToolsVersion
}

When is fix planned to be merged? Can not open the React Native app on android because of this! Please fix!

@nikasvan you can temporarily restrict the react-native-onesignal version in package.json to 3.1.2.

@Kisepro @HessiPard @nikasvan We have released version 3.1.4 with a fix for this. https://github.com/geektimecoil/react-native-onesignal/releases

Working like a charm
Thanks !

@jkasten2 I'm using 3.1.4 and I'm still getting this issue.

    compileSdkVersion 23
    buildToolsVersion "23.0.1"

@ChristianTucker Are you seeing this specific error or a different one?

Could not find any version that matches com.android.support:support-v4:[26.0.0, 27.2.0).

The com.android.support dependency was excluded in 3.1.4 so this should NOT be pulled in from OneSignal.
https://github.com/geektimecoil/react-native-onesignal/blob/3.1.4/android/build.gradle#L31

Are you able to reproduce the issue with a new react project with OneSignal? Or does the problem only occur once you start adding other plugins?

Was this page helpful?
0 / 5 - 0 ratings