当前位置:网站首页>Summary of ant usage (I): using ant to automatically package apk
Summary of ant usage (I): using ant to automatically package apk
2022-06-23 05:59:00 【linchaolong】
To configure ant Environmental Science
(1) download ant
Download address 1 :http://mirrors.cnnic.cn/apache//ant/binaries/apache-ant-1.9.4-bin.zip
Download address 2 :http://pan.baidu.com/s/1gdnc98n
(2) decompression ant, And put bin The directory path is configured to the system path variable

In the command line window, you can execute ant Command indicates successful configuration

Update project configuration
(1) Open the command line window , Execute the following command :
SDK root directory \tools\android update project --name Project name --target Compiled using Android SDK edition --path Project path
Example :
D:\AndroidDeveloper\adt-bundle-windows-x86_64-20140321\sdk\tools\android update project --name Linchaolong --target android-10 --path E:\Project\Linchaolong
Use android list target The command can list SDK Version list .
(2) After successful execution, the following files will be generated in the project directory :
ant.properties
build.xml
local.properties
proguard-project.txt
Be careful : If the project depends on other projects , These files are also required for dependent projects , You can also use this command to generate .
Related configuration
(1) stay ant.properties Configuration in file .keystore Document related information
key.store=.keystore File path
key.store.password=.keystore File password
key.alias.password= Alias password
key.alias= Alias
#java Code obfuscation configuration file
proguard.config=proguard-project.txt
(2) Use ant Command to generate apk
Optional parameters :
debug: Construction of trial signature with tone
release: Building the application , Generated apk You must sign to publish
install: Install the debug build package to the running simulator or device ;
Such as :ant release Represents the apk,apk Generate in project bin Under the table of contents .
Error log
error :[aapt] invalid resource directory name: xxx/bin/res/crunch
terms of settlement : Delete crunch Folder , And click Project ——Project—— Cancel Build Automatically, That's it .
Refer to the article address :http://blog.csdn.net/androiddevelop/article/details/11553215
Related articles :
边栏推荐
- 数字藏品如何赋能经济实体?
- ant使用总结(一):使用ant自动打包apk
- Alibaba cloud ack one and ACK cloud native AI suite have been newly released to meet the needs of the end of the computing era
- 三项最高级认证,两项创新技术、两大优秀案例,阿里云亮相云原生产业大会
- Excel sheet column number for leetcode topic resolution
- jvm-05. garbage collection
- Pat class B 1016 C language
- jvm-06.垃圾回收器
- Basic calculator for leetcode topic analysis
- Advanced Mathematics (Seventh Edition) Tongji University exercises 1-7 personal solutions
猜你喜欢

Kotlin android简单Activity跳转、handler和thread简单配合使用

jvm-06.垃圾回收器

Addressing and addressing units

数字藏品市场才刚刚开始

Jvm: when a method is overloaded, the specific method to call is determined by the static type of the incoming parameter rather than the actual type of the parameter

jvm-06. Garbage collector

Real MySQL interview questions (25) -- common group comparison scenarios

How does win11 enable mobile hotspot? How to enable mobile hotspot in win11

True MySQL interview question (24) -- row column exchange

Centos7 deploy radius service -freeradius-3.0.13-15 EL7 integrating MySQL
随机推荐
PAT 乙等 1009 C语言
PAT 乙等 1023 组个最小数
数字化工厂建设可划分为三个方面
Work accumulation - judge whether GPS is on
Pyinstaller sklearn报错的问题
runc 符号链接挂载与容器逃逸漏洞预警(CVE-2021-30465)
android Handler内存泄露 kotlin内存泄露处理
jvm-03.jvm内存模型
gplearn出现 assignment destination is read-only
Pat class B 1017 C language
Leetcode topic analysis add binary
Pat class B 1020 Moon Cake
数字藏品火热背后需要强大的技术团队支持 北方技术团队
Centos7部署radius服务-freeradius-3.0.13-15.el7集成mysql
数字藏品赋能实体产业释放了哪些利好?
PAT 乙等 1025 反转链表
The hierarchyviewer tool cannot find the hierarchyviewer location
APP SHA1获取程序 百度地图 高德地图获取SHA1值的简单程序
jvm-06. Garbage collector
Centos7 deploy radius service -freeradius-3.0.13-15 EL7 integrating MySQL