当前位置:网站首页>Flutter:异常处理
Flutter:异常处理
2022-07-28 16:38:00 【两块三刀】
异常信息:Gradle task assembleRelease failed with exit code 1
此信息是在执行终端命令:flutter build apk 打包APK时 报出的,
原因:没有配置Android打包签名;
配置签名:
1、在android模块下创建文件“key.properties”,并填写密钥信息.(如何创建APP密钥 这里不再叙述,百度一下你就知道了)
storePassword=你的密码
keyPassword=你的密码
keyAlias=你的密钥别名
storeFile=你的密钥路径,如D:/app_key.jks
2、在android/app/build.gradle 文件 配置以下信息:
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
...此处省略一些信息...
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
Flutter打包APK
好了,接下来你就可以重新执行打包命令了:> flutter build apk
安装包位置在:build\app\outputs\apk\release\app-release.apk
边栏推荐
猜你喜欢

Mysql5.7 compressed package installation tutorial

多线程的使用

mysql5.7压缩包安装教程

Encapsulation, inheritance, polymorphism

Compilation principle learning notes 1 (compilation principle overview and lexical analysis)

abstract、static、final

Openpcd installation process record

关于localtion 下的root和alias的区别

2022 IDEA (学生邮箱认证)安装使用教程以及基础配置教程

Mmdetection3d (2) -- visualization of results and logs
随机推荐
Branch and loop statements
如何安装ps的滤镜插件
leetcode系统性刷题(三)-------二叉树、二分查找
2022 IDEA (学生邮箱认证)安装使用教程以及基础配置教程
Branch and loop (for and do while)
MySQL and idea connection
ROS scattered knowledge points and error resolution
How to upload a project to the code cloud using idea
关于图片的像素、分辨率、尺寸问题的解答,以及显示器的显示大小。
把MySQL8的数据库备份导入MySQL5版本中
视频号如何将公域流量将用户导入私域
QT programming serial port assistant
“3·8女王节”限时大促竟让场观、视频号销量翻倍?
Leetcode systematic question brushing (3) -- binary tree, binary search
PS fast making full screen watermark
视频号更像是2.0版的公众号
封装、继承、多态
1.1-注释
Domain name resolution problem record
mmdetection3d(2)---结果、log可视化