简体   繁体   中英

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

Was working fine just before and after rebuilding the process was interrupted with a sudden restart, and after that this is the error showing up, I've tried every possible solution found on the internet.

I run v1.22.6 for the project.

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 resolve com.google.android.gms:play-services-ads-identifier:[15.0.0, 16.0.99]. Required by: project:app > com.onesignal:OneSignal:3.15.7 > Failed to list versions for com.google.android.gms:play-services-ads-identifier. > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-ads-identifier/maven-metadata.xml . > Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-ads-identifier/maven-metadata.xml'. > Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-ads-identifier/maven-metadata.xml'. Received status code 403 from server: Forbidden 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

  • 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 0s Exception: Gradle task assembleDebug failed with exit code 1

Run Flutter Doctor, and check if it gives error related to android licenses? If yes than run flutter doctor --android-licenses. Just accept all and it should work.

Try changing the dependency versions in pubspec.yaml file that you recently added. Then rebuild the project.

***.bintray.com 40X error is related to jFrog stop update the services in original domain.

repositories {
  jcenter() // <-- remove this line
  mavenCentral() // <-- add this line
}

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