Closed Davete0302 closed 2 years ago
@Davete0302 I see /exoplayer/
in the URL it has an issue trying to get, do you have that plugin in your app? Please run flutter pub deps
and share incase any other plugins include it.
I recommend searching through your project directory to make sure that no build.gradle
file has jcenter()
, as this is the most common cause for why bintray.com
is trying to be accessed.
@jkasten2 Updated to include pub deps
. After searching jcenter in scope level. I found several plugins that use jcenter. Do I replace this with mavenCentral()
?
Also no I don't have /exoplayer/ plugin in the app
@Davete0302 Yes as a work around for now you should be able to replace jcenter()
with mavenCentral()
in all your build.gradle
files. Almost all libraries hosted on jcenter are also on Maven Central. OneSignal will be making an update to remove all jcenter()
references soon as well.
I have the same problem. We're using mavenCentral() and it's giving build errors when trying to build for debug or release.
Using version 2.6.4 on Flutter 1.22.6
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDevProfileAssets'.
> Could not resolve all files for configuration ':app:devProfileRuntimeClasspath'.
> Could not resolve com.google.android.gms:play-services-location:[15.0.0, 16.0.0).
Required by:
project :app > project :onesignal_flutter > com.onesignal:OneSignal:3.15.7
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
* 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 1m 11s
Running Gradle task 'assembleDevProfile'... 71.6s
Gradle task assembleDevProfile failed with exit code 1
@jkasten2 I replaced jcenter()
with mavenCentral()
in onesignal_flutter build.gradle but the issue still persists. Tried removing one signal plugin and app built successfully, so I think this is a one signal issue. Also followed steps to upgrade at: OneSignal/OneSignal-Android-SDK#1293. Unfortunately the steps have not resolved the issues.
One signal build.gradle for details
group 'com.onesignal.flutter'
version '2.6.3'
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 16
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
api 'com.onesignal:OneSignal:3.16.0'
}
// Adds required manifestPlaceholders keys to allow mainifest merge gradle step to complete
// The OneSignal app id should be set in your JS code.
// Google project number / FCM Sender ID will be pulled in from the OneSignal dashbaord
class DefaultManifestPlaceHolders {
static final MANIFEST_PLACEHOLDERS_DEFAULTS = [
onesignal_app_id: '${onesignal_app_id}',
onesignal_google_project_number: '${onesignal_google_project_number}'
]
static void addManifestToAppProject(Project proj) {
def androidApp = proj.android
MANIFEST_PLACEHOLDERS_DEFAULTS.each { defKey, defValue ->
if (!androidApp.defaultConfig.manifestPlaceholders.containsKey(defKey)) {
androidApp.defaultConfig.manifestPlaceholders[defKey] = defValue
androidApp.buildTypes.each { buildType ->
if (!buildType.manifestPlaceholders.containsKey(defKey))
buildType.manifestPlaceholders[defKey] = defValue
}
}
}
}
}
rootProject.childProjects.each { projName, proj ->
if (projName != 'app' && projName != 'onesignal_flutter')
return
if (proj.hasProperty('android')) {
DefaultManifestPlaceHolders.addManifestToAppProject(proj)
return
}
proj.afterEvaluate {
DefaultManifestPlaceHolders.addManifestToAppProject(proj)
}
}
@Davete0302 Yes as a work around for now you should be able to replace
jcenter()
withmavenCentral()
in all yourbuild.gradle
files. Almost all libraries hosted on jcenter are also on Maven Central. OneSignal will be making an update to remove alljcenter()
references soon as well.
@jkasten2 I know OneSignal will be making an update to remove all jcenter() references soon as well. Will you be applying that fix to the 2.2.0 flutter plugin version too? We've spent 5 months working on our current project and will use the newer version for future work but we'd be very grateful to be able to finish this work on 2.2.0.
This seems to be an issue with the plugin.gradle.org/m2 plugin portal more than anything. From what I can tell, it's still redirecting to bintray when trying to fetch some maven-metadata.xml files
Same problem ((
any solution?
my temporary solution is add this project as submodule in your flutter project
git submodule add https://github.com/OneSignal/OneSignal-Flutter-SDK.git
and checkout to version 2.6.4
change onesignal_flutter dependency in pubspect.yaml
onesignal_flutter:
path: ./OneSignal-Flutter-SDK
replace file /OneSignal-Flutter-SDK/android/build.gradle
with this
group 'com.onesignal.flutter'
version '2.6.4'
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.4'
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com' }
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 21
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
implementation 'com.google.android.gms:play-services-ads-identifier:16.0.0'
implementation 'com.google.android.gms:play-services-base:16.0.0'
api 'com.onesignal:OneSignal:3.16.0'
}
// Adds required manifestPlaceholders keys to allow mainifest merge gradle step to complete
// The OneSignal app id should be set in your JS code.
// Google project number / FCM Sender ID will be pulled in from the OneSignal dashbaord
class DefaultManifestPlaceHolders {
static final MANIFEST_PLACEHOLDERS_DEFAULTS = [
onesignal_app_id: '${onesignal_app_id}',
onesignal_google_project_number: '${onesignal_google_project_number}'
]
static void addManifestToAppProject(Project proj) {
def androidApp = proj.android
MANIFEST_PLACEHOLDERS_DEFAULTS.each { defKey, defValue ->
if (!androidApp.defaultConfig.manifestPlaceholders.containsKey(defKey)) {
androidApp.defaultConfig.manifestPlaceholders[defKey] = defValue
androidApp.buildTypes.each { buildType ->
if (!buildType.manifestPlaceholders.containsKey(defKey))
buildType.manifestPlaceholders[defKey] = defValue
}
}
}
}
}
rootProject.childProjects.each { projName, proj ->
if (projName != 'app' && projName != 'onesignal_flutter')
return
if (proj.hasProperty('android')) {
DefaultManifestPlaceHolders.addManifestToAppProject(proj)
return
}
proj.afterEvaluate {
DefaultManifestPlaceHolders.addManifestToAppProject(proj)
}
}
and change file yourproject/android/build.gradle
before dependencies { }
add
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-location:16.0.0'
}
}
done!
note : make sure all jcenter()
has been replaced with mavenCentral()
Its been two weeks and still the bintray issue is not fixed, what the fuck is wrong with Android support
Same issue man. Aiyo
Hi, below as you can see, there's the build gradle at the project level, and it had two maven
references, i just removed the one related to bintray leaving only the top one (https://plugins.gradle.org/m2/) and it worked for me.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'https://dl.bintray.com/android/android-tools' } // Remove this one
mavenLocal()
}
[...]
Flutter: 2.5.3 Dart: 2.14.4 onesignal_flutter: ^3.2.7
This is now fixed and is part of the OneSignal-Flutter-SDK 3.2.8 Release.
Description:
Hi I am trying to run my flutter app debug. I last opened this app on November 3rd week but Today when I build the app debug I am facing below exception. I've been told that bintray has been sunset, but confused as how to replace/update my gradle.
Environment
These are my Flutter and Dart Versions:
OneSignal Plugin
onesignal_flutter: ^2.6.4
Anything else:
Distribution URL in gradle.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
Project Level Gradle:
flutter pub deps
(crash stacktraces, as well as any other information here)