当前位置:网站首页>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 :
边栏推荐
- Leetcode topic analysis add binary
- Opportunities and challenges of digital collections from the perspective of technology development team
- ssm项目搭建
- TCP/IP 详解(第 2 版) 笔记 / 3 链路层 / 3.4 网桥与交换机
- ant使用总结(二):相关命令说明
- PAT 乙等 1020.月饼
- Pat class B 1023 minimum decimals
- 数字藏品赋能实体产业释放了哪些利好?
- PAT 乙等 1013 C语言
- Behind the hot digital collections, a strong technical team is needed to support the northern technical team
猜你喜欢

Centos7 deploy radius service -freeradius-3.0.13-15 EL7 integrating MySQL

jvm-01.指令重排

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

Visual Studio调试技巧

Skill self check | do you know these 6 skills if you want to be a test leader?

Wireshark TS | video app cannot play

True question of MySQL interview (29) -- case - finding favorite movies

Behind the hot digital collections, a strong technical team is needed to support the northern technical team

Software design and Development Notes 2: serial port debugging tool based on QT design

android Handler内存泄露 kotlin内存泄露处理
随机推荐
APP SHA1获取程序 百度地图 高德地图获取SHA1值的简单程序
The difference between SaaS software and traditional software delivery mode
技术开发团队视角看到的数字藏品机遇与挑战
ant使用总结(二):相关命令说明
Activity启动模式和生命周期实测结果
Pat class B 1017 C language
Kotlin Android simple activity jump, simple combination of handler and thread
Centos7 installation of postgresql8.2.15 and creation of stored procedures
Pit filling for abandoned openssl-1.0.2 (.A to.So)
Real MySQL interview questions (XXVI) -- didi 2020 written examination questions
Pat class B 1022 d-ary a+b
True MySQL interview question (XXII) -- condition screening and grouping screening after table connection
The traditional Internet like platform may no longer exist, and a new industry integrating industrial characteristics and Internet characteristics
Pat class B 1023 minimum decimals
PAT 乙等 1020.月饼
【owt】owt-client-native-p2p-e2e-test vs2017构建 6:修改脚本自动生成vs工程
MDM data cleaning function development description
Oracle exception
Pat class B 1019 C language
PAT 乙等 1014 C语言