论坛
潜水/灌水快乐,沉淀知识,认识更多同行。
ToB圈子
加入IT圈,遇到更多同好之人。
朋友圈
看朋友圈动态,了解ToB世界。
ToB门户
了解全球最新的ToB事件
博客
Blog
排行榜
Ranklist
文库
业界最专业的IT文库,上传资料也可以赚钱
下载
分享
Share
导读
Guide
相册
Album
记录
Doing
搜索
本版
文章
帖子
ToB圈子
用户
免费入驻
产品入驻
解决方案入驻
公司入驻
案例入驻
登录
·
注册
只需一步,快速开始
账号登录
立即注册
找回密码
用户名
Email
自动登录
找回密码
密码
登录
立即注册
首页
找靠谱产品
找解决方案
找靠谱公司
找案例
找对的人
专家智库
悬赏任务
圈子
SAAS
IT评测·应用市场-qidao123.com技术社区
»
论坛
›
软件与程序人生
›
移动端开发
›
[解决]Flutter打包Android是出现FAILURE: Build failed ...
[解决]Flutter打包Android是出现FAILURE: Build failed with an exception ...
南飓风
论坛元老
|
2025-2-26 00:37:15
|
显示全部楼层
|
阅读模式
楼主
主题
1779
|
帖子
1779
|
积分
5337
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要
登录
才可以下载或查看,没有账号?
立即注册
x
1.问题出现
本日我更新完flutter以后发现Gradle 从7.3 升级到最低8.0,然后gradle-wrapper.properties 里面升级到8.3了,图片如下
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
# distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.3-all.zip
复制代码
然后打包APK时出现一个问题,如下
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Launching lib\main.dart on ASUS I003DD in debug mode...
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find androidx.lifecycle:lifecycle-common:2.7.0.
Searched in the following locations:
- https://maven.aliyun.com/nexus/content/repositories/google/androidx/lifecycle/lifecycle-common/2.7.0/lifecycle-common-2.7.0.pom
- https://maven.aliyun.com/repository/jcenter/androidx/lifecycle/lifecycle-common/2.7.0/lifecycle-common-2.7.0.pom
- https://maven.aliyun.com/repository/public/androidx/lifecycle/lifecycle-common/2.7.0/lifecycle-common-2.7.0.pom
- https://storage.flutter-io.cn/download.flutter.io/androidx/lifecycle/lifecycle-common/2.7.0/lifecycle-common-2.7.0.pom
Required by:
project :app > io.flutter:flutter_embedding_debug:1.0.0-db49896cf25ceabc44096d5f088d86414e05a7aa
> Could not find androidx.lifecycle:lifecycle-common-java8:2.7.0.
Searched in the following locations:
复制代码
2.挖掘问题根源
我任意抓去一个链接访问看看,比如这个
https://maven.aliyun.com/nexus/content/repositories/google/androidx/lifecycle/lifecycle-common/2.7.0/lifecycle-common-2.7.0.pom
复制代码
然后上阿里云的镜像网站搜刮这个工具 lifecycle-common
好家伙,阿里云还没更新2.7版本,最高2.6.1版本,所以我在build.gradle里屏蔽了阿里云,写了腾讯的
maven { url 'https://mirrors.tencent.com/nexus/repository/maven-public/' } // 腾讯云仓库
mavenCentral()
复制代码
3.解决问题
不出意外,这次乐成解决了
4.注意
gradle最小可以8.0开始,8.3换腾讯的源也下载很慢,耐心等待
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复
使用道具
举报
0 个回复
正序浏览
返回列表
快速回复
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
or
立即注册
本版积分规则
发表回复
回帖并转播
发新帖
回复
南飓风
论坛元老
这个人很懒什么都没写!
楼主热帖
零信任介绍
容斥原理
开源SPL助力JAVA处理公共数据文件(txt ...
使用 Helm 安装 MQTT 服务器-EMQX ...
数理逻辑第1-3章
Ubuntu如何安装Mysql+启用远程连接[完 ...
dotnet 修复在 Linux 上使用 SkiaSharp ...
DOS窗口命令和单表简单查询
Java笔记(13) 简单的Lambda表达式 ...
.gitignore文件配置以及gitee提交报Pus ...
标签云
AI
运维
CIO
存储
服务器
浏览过的版块
物联网
Postrge-SQL技术社区
IOS
开源技术
鸿蒙
快速回复
返回顶部
返回列表