当前位置:网站首页>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
边栏推荐
猜你喜欢

怎样将IDEA与码云进行绑定

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

如何安装ps的滤镜插件

1.2-hexadecimal conversion
![[advanced C language] - function pointer](/img/73/95380bb719f609e80de56985ed68fd.png)
[advanced C language] - function pointer

MySQL与IDEA连接

Leetcode systematic question brushing (II) -- greed, backtracking, recursion

OpenMV(三)--实时获取摄像头图片

From 0 to 1: Development notes of voting applet based on cloud development

Methods, functions
随机推荐
Domain name resolution problem record
Methods, functions
数字滤波器(三)--模拟滤波器的设计
2022 idea (student email authentication) installation and use tutorial and basic configuration tutorial
Branch and loop (for and do while)
$(document).Width() in WebView is a value
Encapsulation, inheritance, polymorphism
[reading notes] for:object detection with deep learning: the definitive guide
QT programming serial port assistant
[unity] how to play sprite Jiugongge?
3.2- random numbers
电脑充不进去电的解决方法
视频关联商品销量提升88%
com.mysql.jdbc. Configuration files of driver and com.mysql.cj.jdbc.driver
Branch and loop statements
@Detailed explanation of requestmapping
MySQL详解
2.2- data type
[unity] three pictures let you understand the shadergraph editor
MySQL的安装