Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating version from 3.1.2 to 3.1.3 : Could not resolve all dependencies for configuration #442

Closed
Kisepro opened this issue Mar 29, 2018 · 9 comments

Comments

@Kisepro
Copy link

Kisepro commented Mar 29, 2018

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 ?

@HessiPard
Copy link

Same Issue here

@HessiPard
Copy link

i think its because of this commit :
2d94cfe
the minimum sdk version has been changed!

@jkasten2
Copy link
Member

jkasten2 commented Mar 29, 2018

@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 facebook/react-native#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
}

@nikasvan
Copy link

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

@HessiPard
Copy link

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

@jkasten2
Copy link
Member

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

@Kisepro
Copy link
Author

Kisepro commented Apr 4, 2018

Working like a charm
Thanks !

@ChristianTucker
Copy link

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

    compileSdkVersion 23
    buildToolsVersion "23.0.1"

@jkasten2
Copy link
Member

jkasten2 commented Apr 11, 2018

@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?

Jyrno42 added a commit to thorgate/react-native-photo-view that referenced this issue Aug 21, 2018
The buildTools version can be obtained from `rootProject.ext` on react-native 0.56. This
commit adds support for that and if the variables are not defined falls back to the
versions expected by react-native (on 0.56).

This also adds a way of customizing the fresco library version
used via `rootProject.ext.frescoVersion`.

inspired by: OneSignal/react-native-onesignal#442 (comment)
Jyrno42 added a commit to thorgate/react-native-photo-view that referenced this issue Aug 21, 2018
The buildTools version can be obtained from `rootProject.ext` on react-native 0.56. This
commit adds support for that and if the variables are not defined falls back to the
versions expected by react-native (on 0.56).

This also adds a way of customizing the fresco library version
used via `rootProject.ext.frescoVersion`.

inspired by: OneSignal/react-native-onesignal#442 (comment)
Jyrno42 added a commit to thorgate/react-native-photo-view that referenced this issue Aug 21, 2018
The buildTools version can be obtained from `rootProject.ext` on react-native 0.56. This
commit adds support for that and if the variables are not defined falls back to the
versions expected by react-native (on 0.56).

This also adds a way of customizing the fresco library version
used via `rootProject.ext.frescoVersion`.

inspired by: OneSignal/react-native-onesignal#442 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants