简体   繁体   English

Flutter - 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系

[英]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:问题是 OneSignal 依赖于一些被禁止返回的谷歌服务,这就是我得到的:

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?我之前在更新 flutter 本身时遇到了一个问题,我必须使用 VPN 才能更新,这是同一件事吗? 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?我搜索了 Github 问题和堆栈溢出问题,但没有解决问题,还将这个应用程序与我构建的其他应用程序进行了比较,但实现是相同的(OneSignal 明智的),它们似乎工作正常,这可能是什么原因?

NOTE : I also get this issue even when using a VPN注意:即使使用 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 1- 在 build.gradle(应用程序级别)内部,我从

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 2- 在 build.gradle(项目级别)内部,我从 gradle

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 3- 在 gradle > wrapper > gradle-wrapper.properties 里面我更新了 gradle

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) 4- 将一个信号 package 更新为版本 ^2.6.3 而不是 ^2.6.1(我不认为它做了什么,但是是的)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。[Flutter] - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.[Flutter] 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Flutter 无法确定 flutter 中任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' in flutter 无法确定任务 ':app:compileDebugJavaWithJavac' Flutter 的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Flutter 无法确定任务“:app:compileDebugJavaWithJavac”的依赖关系。 - 颤振问题 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. - Flutter Issue Flutter 构建错误:无法确定任务':app:compileDebugJavaWithJavac的依赖关系 - Flutter Build Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac flutter run 无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - flutter run Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Flutter 通知 OneSignal - 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter Notification OneSignal - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 无法确定任务':app:compileDebugJavaWithJavac Flutter VS的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac Flutter VS 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 颤振应用 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. flutter application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM