Solution not found by using ant to package apkbuilder

Source: Internet
Author: User

In the case of apkbuilder, the APK file is generated. In fact, apkbuilder is a batch file, which can be opened. In fact, it runs sdklib internally. jar contains a class, so we know how to do it. It is very simple. We directly call Java to execute this class, as shown below:

[HTML] view plaincopy view code snippets derived from my code snippets on code
<Java classpath = "$ {Android. Tools}/lib/sdklib. Jar" classname = "com. Android. sdklib. Build. apkbuildermain">
<Arg value = "$ {path. Build. Main}/bin/unsigned.apk"/>
<Arg value = "-U"/>
<Arg value = "-z"/>
<Arg value = "$ {path. Build. Main}/bin/res.zip"/>
<Arg value = "-F"/>
<Arg value = "$ {path. Build. Main}/bin/classes. Dex"/>
<Arg value = "-RF"/>
<Arg value = "$ {path. Build. Main}/src"/>
<Arg value = "-RJ"/>
<Arg value = "$ {path. Build. Main}/Libs"/>
<Arg value = "-NF"/>
<Arg value = "$ {path. Build. Native}"/>
</Java>

In fact, the previous apkbuilder. bat was also executed internally.
[HTML] view plaincopy view code snippets derived from my code snippets on code
The class com. Android. sdklib. Build. apkbuildermain is directly executed here. It is actually the same!

Solution not found by using ant to package apkbuilder

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.