Description:
My app has been building successfully for more than 3 months. Today, no one in my team was able to do so.
Environment
onesignal_flutter: ^2.0.0
Steps to Reproduce Issue:
Log:
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find any matches for com.onesignal:OneSignal:[3.11.2,3.99.99] as no versions of com.onesignal:OneSignal are available.
Required by:
project :app
Could not find any matches for com.onesignal:OneSignal:[3.11.2,3.99.99] as no versions of com.onesignal:OneSignal are available.
Required by:
project :app > project :onesignal_flutter
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 30s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Same problem here
Me too 馃槕
Me too, now after 1 pm I can't compile anymore. My version of the fluter is as follows and the onesignal:
Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [vers脙拢o 10.0.18363.720], locale pt-BR)
onesignal_flutter: ^2.3.4
Updating onesignal in app/build.gradle seems to fix it
dependencies {
// (OLD) implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99'
implementation 'com.onesignal:OneSignal:3.12.7'
}
Edit by @jkasten2 (2020-03-24)
Please remove implementation 'com.onesignal:OneSignal:...' from your app/build.gradle instead.
See https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/221#issuecomment-603121893 for more details on why.
The OneSignal Android native SDK is hosted on Maven Central. They had a small window of downtime yesterday but nothing today.
https://status.maven.org/
implementation 'com.onesignal:OneSignal:3.12.7'
This worked for me! Thanks!
Updating onesignal in app/build.gradle seems to fix it
dependencies { // (OLD) implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99' implementation 'com.onesignal:OneSignal:3.12.7' }
This worked for me! Thanks!
Updating onesignal in app/build.gradle seems to fix it
dependencies { // (OLD) implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99' implementation 'com.onesignal:OneSignal:3.12.7' }
It works. Thanks!
Updating onesignal in app/build.gradle seems to fix it
dependencies { // (OLD) implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99' implementation 'com.onesignal:OneSignal:3.12.7' }
Yeah, this worked. Thanks!
I'll be closing this issue now, but I still think this should be investigated. At the very least, their documentation on flutter setup should be updated.
thanks
Does anyone know how to go to updating onesignal in app/build.gradle? please help!
@samornreality2 you should replace
implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99'
With
implementation 'com.onesignal:OneSignal:3.12.7'
After this, try running the app. The issue related here should be gone.
@samornreality2 you should replace
implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99'
With
implementation 'com.onesignal:OneSignal:3.12.7'
After this, try running the app. The issue related here should be gone.
I'm a newbie in Android Studio: Where can I found implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99' ?
@samornreality2 you should replace
implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99'
With
implementation 'com.onesignal:OneSignal:3.12.7'
After this, try running the app. The issue related here should be gone.I'm a newbie in Android Studio: Where can I found implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99' ?
@samornreality2 the same build.gradle file you edited while following OneSignal's flutter documentation, should be in this path: your_project/android/app/build.gradle
@samornreality2 you should replace
implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99'
With
implementation 'com.onesignal:OneSignal:3.12.7'
After this, try running the app. The issue related here should be gone.I'm a newbie in Android Studio: Where can I found implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99' ?
@samornreality2 the same build.gradle file you edited while following OneSignal's flutter documentation, should be in this path:
your_project/android/app/build.gradle
It's working! Thanks so much馃榾
it is worked
Yes this works, but should however not be closed, sicne either the documentation is wrong or they have another problem.
@lordkleiton
How to implement it in flutter. Getting same error in flutter app.
Yes this works, but should however not be closed, sicne either the documentation is wrong or they have another problem.
@lordkleiton
Ok, I'll reopen this in hope that they at least update the documentation or something.
How to implement it in flutter. Getting same error in flutter app.
I solve this by manually going to android gradle files and changing the implementation as discussed above.
File Location : android\app\build.gradle
Change
[0.12.1, 0.99.99] to 3.12.7
That is in dependencies as below.
dependencies {
implementation 'com.onesignal:OneSignal:[0.12.1, 0.99.99]'
}
to as below
dependencies {
implementation 'com.onesignal:OneSignal:3.12.7'
}
Thanks to everyone reporting the issue.
After reviewing the setup guide we found that implementation 'com.onesignal:OneSignal:... is not needed for Flutter when using this OneSignal-Flutter-SDK plugin.
Please removing the following OneSignal entry from your app/build.gradle
dependencies {
implementation 'com.onesignal:OneSignal:3.12.7'
}
Please still keep the following section as it resolves mismatch versions of other Java libraries that many create compile or runtime issues.
buildscript {
repositories {
// ...
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
// ...
// OneSignal-Gradle-Plugin
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
We have also removed this unnecessary step of our setup guide:
https://documentation.onesignal.com/docs/flutter-sdk-setup#section-4-add-the-one-signal-gradle-plugin-android
Using a version range for the OneSignal-Android-SDK (native) such as implementation 'com.onesignal:OneSignal:[3.11.2,3.99.99]' used to work until recently however due to a missing maven-metadata.xml on JCenter this stopped working. However just a few hours ago OneSignal's maven-metadata.xml on JCenter just showed back up so this is no longer an issue.
This OneSignal-Flutter-SDK plugin has a locked version dependency on OneSignal-Android-SDK. This is a defined to a specific version so you know if you update to a specific version of OneSignal-Flutter-SDK you will always get the same native SDK along with it. This is noted in the release notes. This version is defined in this repo's android/build.gradle file in case you need to bump it to get critical fix before a OneSignal-Flutter-SDK update is available including it.
Most helpful comment
Updating onesignal in app/build.gradle seems to fix it
Edit by @jkasten2 (2020-03-24)
Please remove
implementation 'com.onesignal:OneSignal:...'from yourapp/build.gradleinstead.See https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/221#issuecomment-603121893 for more details on why.