简体   繁体   中英

Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

Today suddenly my app stopped working (can't build anymore), although I was able to build couple hours earlier.

the issue is that OneSignal depends on some google services which come back as forbidden, this is what I get:

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0).
     Required by:
         project :app > com.google.android.gms:play-services-location:15.0.1
         project :app > com.google.android.gms:play-services-places-placereport:15.0.1
      > Failed to list versions for com.google.android.gms:play-services-basement.
         > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-basement/maven-metadata.xml.
            > Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-basement/maven-metadata.xml'.
               > Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-basement/maven-metadata.xml'. Received status code 403 from server: Forbidden
   > Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0).
     Required by:
         project :app > com.google.android.gms:play-services-location:15.0.1
      > Failed to list versions for com.google.android.gms:play-services-tasks.
         > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-tasks/maven-metadata.xml.
            > Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-tasks/maven-metadata.xml'.
               > Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-tasks/maven-metadata.xml'. Received status code 403 from server: Forbidden

I had an issue before when updating flutter itself where I had to use a VPN to be able to update, is this the same thing? I searched Github issues and stack overflow questions but none fixed the issue, also compared this app to others I've built but the implementation is identical (OneSignal wise) and they seem to work fine, what could be the cause of this?

NOTE : I also get this issue even when using a VPN

Thanks for everyone who commented on the question, but I saw these resources before, fortunately though, I was able to fix it by doing the following:

1- Inside build.gradle (app level), I bumped up one signal gradle from

classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.6, 0.99.99]'

to

classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.10'

2- Inside build.gradle (project level), I bumped up gradle from

classpath 'com.android.tools.build:gradle:3.5.0'

to

classpath 'com.android.tools.build:gradle:4.1.3'

3- Inside gradle > wrapper > gradle-wrapper.properties I updated gradle from

distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

to

distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

4- Updated one signal package to version ^2.6.3 instead of ^2.6.1 (I don't think it did something but yeah)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM