react-native-onesignal icon indicating copy to clipboard operation
react-native-onesignal copied to clipboard

Could not resolve all dependencies for configuration ':app:_debugApkCopy'

Open Jvictor97 opened this issue 8 years ago • 10 comments

Description:

I'm getting the following when trying to run my project on Android:

$ react-native run-android
Scanning folders for symlinks in C:\[project path]\ReactNative_PushNotifications\oneSignalApp\node_modules (145ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not find any matches for com.google.firebase:firebase-iid-license:[10.2.1,12.1.0[ as no versions of com.google.firebase:firebase-iid-license are available.
     Required by:
         oneSignalApp:app:unspecified > oneSignalApp:react-native-onesignal:unspecified > com.onesignal:OneSignal:3.10.1 > com.google.firebase:firebase-messaging:11.0.4 > com.google.firebase:firebase-iid:11.8.0
   > Could not find any matches for com.google.firebase:firebase-common-license:[10.2.1,12.1.0[ as no versions of com.google.firebase:firebase-common-license are available.
     Required by:
         oneSignalApp:app:unspecified > oneSignalApp:react-native-onesignal:unspecified > com.onesignal:OneSignal:3.10.1 > com.google.firebase:firebase-messaging:11.0.4 > com.google.firebase:firebase-common:11.8.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 40.528 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Environment

  • react-native 0.55.4
  • react-native-onesignal 3.2.7

Steps to Reproduce Issue:

  1. I've installed and linked the react native SDK
  2. I've added the code to my Manifest file and build.gradle file as recommended in the docs

Obs.: this project was a test I made using OneSignal and it was working until last week, so I guess the problem may have to do with some third party update

Jvictor97 avatar Oct 24 '18 17:10 Jvictor97

Hello, this issue with me to, another minutes i execute and work, but another time dont work.

kivervinicius avatar Oct 25 '18 02:10 kivervinicius

resolved?

kivervinicius avatar Oct 26 '18 02:10 kivervinicius

same here.

"react": "16.3.1",
 "react-native": "0.55.2",
 "react-native-onesignal": "^3.2.7"

I just back to [email protected] and added fcm parameters in android/app/build.gradle

android {
    ...
    defaultConfig {
        ...
        manifestPlaceholders = [onesignal_app_id: "app-id",
                                        onesignal_google_project_number: "sender"]
    }

iLevye avatar Oct 28 '18 15:10 iLevye

Can you try updating to the latest 0.12.1 version of the OneSignal-Gradle-Plugin? An update was just released this week which might fix this issue. https://documentation.onesignal.com/docs/react-native-sdk-setup#section-adding-the-gradle-plugin

Also double check you have setup this plugin in the correct build.gradle in the correct spot to make sure it is running.

Please attach a project reproducing the issue if this does not help.

jkasten2 avatar Nov 01 '18 22:11 jkasten2

I double checked the build.gradle as requested and everything seems fine. Also tried updating the gradle plugin but the error is still happening. I've created a repo with a copy of my project just remember to add you OneSignal AppID on App.js before testing.

Here it is: https://github.com/Jvictor97/OneSignalTesting

Jvictor97 avatar Nov 05 '18 09:11 Jvictor97

Same issue here.

I created this project and everything was working last month, but now isn't work anymore.

Error message: Could not find any matches for com.google.firebase:firebase-iid-license:[10.2.1,12.1.0[ as no versions of com.google.firebase:firebase-iid-license are available.

hkanizawa avatar Nov 06 '18 16:11 hkanizawa

I can solve it by adding maven url to android/build.gradle repositories:

maven {
            url 'https://maven.google.com'
        }

The full code:

allprojects {
    repositories {
        maven {
            url 'https://maven.google.com'
        }
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

Now it is building normally, but don't registering user to Onesignal's App.

hkanizawa avatar Nov 06 '18 17:11 hkanizawa

I tried @iLevye 's approach and it worked. But I see it as a temporary solution. Something should be done to version 3.2.7 so it can work properly.

Jvictor97 avatar Nov 07 '18 12:11 Jvictor97

@Jvictor97 @iLevye maven { url 'https://maven.google.com' } or google() should be added automatically by react native. It is needed to get any version of Google Play services or Firebase released in the last 9 months. It is also already in our example project. https://github.com/geektimecoil/react-native-onesignal/blob/3.2.7/examples/RNOneSignal/android/build.gradle#L19

jkasten2 avatar Nov 07 '18 22:11 jkasten2

Closing due to no response, assuming jkasten's response fixed your issue.

Nightsd01 avatar Jan 16 '19 00:01 Nightsd01