flutter - 无法在颤振中构建apk
问题描述
我正在尝试从我的颤振项目中构建一个 api,上个月我做的时候很好flutter build apk
,但现在不行......我无法做到这一点,这是错误日志
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-location:16.+.
Required by:
project :app > project :location
> 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 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 33s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 34.3s
Gradle task assembleRelease failed with exit code 1
这是我的 android/build.gradle:https ://gist.github.com/wahyu-handayani/959de3306aa1410c1b9b78ad927cc35c
解决方案
尝试将您的 gradle 包装器更新为:distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip
推荐阅读
- python - 在 Pandas 中创建每周个人资料
- html - 尽管将位置更改为静态,但 CSS 导航栏仍固定在顶部
- java - 单击 JButton 时 Java JTable 发生变化
- javascript - TypeError:在 React 组件中使用 Google Location API 时无法读取未定义的属性“位置”
- c# - VBA 中的 ReDim myarray(True to True) 是什么?
- r - 如何对多行多列的数据进行排名?
- java - 如何在弹性搜索索引中插入数据
- javascript - 从 Firebase 异步加载数据
- flutter - 如何创建一排容器,它们之间没有任何间距?
- google-apps-script - 如何在谷歌应用脚本中使用 Jobs 资源?