当前位置:网站首页>[fluent -- advanced] packaging
[fluent -- advanced] packaging
2022-07-26 16:28:00 【Kevin-Dev】

List of articles
1. Generate key
After writing the application , Finally, it's packed , Because I use Android studio Developed , So directly in Terminal Input :
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 100000 -alias key
Remember here -alias key key Alias , You can change it yourself , eject :
Enter the keystore password :
Enter the new password again :
What is your first and last name ?
[Unknown]: knight
What is the name of your organizational unit ?
[Unknown]: knight
What is the name of your organization ?
[Unknown]: knight
What is the name of your city or area ?
[Unknown]: knight
Your province / City / What is the name of the Autonomous Region ?
[Unknown]: knight
The unit's two letter country / What is the area code ?
[Unknown]: C
CN=knight, OU=knight, O=knight, L=knight, ST=knight, C=C Whether it is right ?
[ no ]: Y
Generating 2,048 position RSA Key pairs and self signed certificates (SHA256withRSA) ( Valid for 100,000 God ):
CN=knight, OU=knight, O=knight, L=knight, ST=knight, C=C
[ Storing /Users/luguian/key.jks] --> Generate the corresponding signature file
I copied it to android Under the table of contents .
2. establish key.properties
stay android Create one in the directory key.properties:
3. change build.gradle

-----> increase
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
----->
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.flutterdemo"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
-----> increase
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
// proguard The document is confusing
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
------> increase
}
4. Add obfuscation file
By default ,Flutter Don't confuse or shrink Android host . If you plan to use a third party Java or Android library , You may want to reduce APK Size or protect the code from reverse engineering , That's in android/app/ Add below proguard-rules.pro:
Finally, execute in the project root :
flutter build apk
Initializing gradle... 0.6s
Resolving dependencies... 1.3s
Gradle task 'assembleRelease'...
Gradle task 'assembleRelease'... Done 7.2s
Built build/app/outputs/apk/release/app-release.apk (15.8MB).
The final output is build-app-release Next :
And it worked .
ios How to pack , Please check flutter.dev/docs/deploy….
边栏推荐
- The process and harvest of developing browser plug-ins with clojurescript
- Comprehensively design an oppe homepage -- the design of the top and head
- Re9:读论文 DEAL Inductive Link Prediction for Nodes Having Only Attribute Information
- 工作流引擎在vivo营销自动化中的应用实践
- Final consistency distributed transaction TCC
- 综合设计一个OPPE主页--导航栏的设计
- 阿里云DMS MySQL云数据库建表报错,求解!!
- Nacos win10 安装配置教程
- Jmeter快速上手之接口测试
- Mapwithstate of spark streaming state flow
猜你喜欢

【Flutter -- 进阶】打包

【物理模拟】最简单的shape matching的原理与实践

Re8: reading papers Hier spcnet: a legal stat hierarchy based heterogeneous network for computing legal case

Bugku login2

综合设计一个OPPE主页--明星机型的设计

Tdengine landed in GCL energy technology, with tens of billions of data compressed to 600gb

PAT甲级1048 Find Coins

The "nuclear bomb level" log4j vulnerability is still widespread and has a continuing impact

Advanced CAD exercises (I)

MVC和ECS两种设计架构的初浅理解
随机推荐
Pat grade a 1049 counting ones
《硅谷之谜》读后感
TKE集群节点max-pod是如何配置的
测试用例千万不能随便,记录由一个测试用例异常引起的思考
数字化转型怎么就那么的难?!
请问一下各位大佬,mysql-cdc建表如何指定表的字符集呢,在官网没找到相应的连接器参数。我读一个
Clojure Web 开发-- Ring 使用指南
PAT甲级 1047 Student List for Course
Sql语句——单行注释与多行注释
The solution to the display disorder of several events files in the tensorboard
结构体和类使用的区别
From SiCp to LISP video replay
【物理模拟】超简单的shape matching模拟刚体运动
kubernetes之ConfigMap
PAT甲级 1050 String Subtraction
【万字长文】使用 LSM-Tree 思想基于.Net 6.0 C# 实现 KV 数据库(案例版)
Development daily summary (11): file upload function improvement: Chinese character detection and text content processing
【物理模拟】最简单的shape matching的原理与实践
2022牛客暑期多校训练营1(ACDGIJ)
The process and harvest of developing browser plug-ins with clojurescript