Whether to generate odex settings for Android Compilation

Source: Internet
Author: User

By default, the odex version is compiled. If you need a non-odex version, change the values of the following two variables of device/Huawei/k3v2_s10/boardconfig. mk:
Disable_dexpreopt: = true
With_dexpreopt: = false
Other Instructions
A. the configuration files under device/hisi/k3v2oem1/are no longer used. The corresponding configuration files are in the device/Huawei/k3v2_s10/directory. If you need to modify the configuration file later, modify the directory.
The product compilation image k3v2oem1 in the B. Out/target/product/directory is no longer in use. It corresponds to the product image of Huawei, such as out/target/product/hws10101u.
C. [compile APK without generating odex]
Currently, the APK and odex are generated when the code in the library is compiled. Push/install does not take effect.
Solution:
(1. do not generate odex, only generate APK, and change the value of local_dex_preopt to false.
That is to say, in build \ core \ package. mk, the value of row 156 is changed to local_dex_preopt: = false.
After the above modification, all the files will be re-compiled. Later, you can compile the APK separately by mm to facilitate debugging.

(2 What should I do if I don't want to re-compile the entire compilation after a short time?
Add with_dexpreopt: = false to the Android. mk file in the corresponding APK code path.
After adding the file, MM re-compiles the file to generate the APK.

[Compile a jar package without generating odex]
Currently, jar and odex are generated when the code in the library is compiled for the framework. At this time, the push will not start when the framework is started.

Solution:
Only jar packages are generated during compilation, and odex is not generated. That is, in build/CORE/java_library.mk, line 37 is changed to local_dex_preopt: = false. After the above modification, all are re-compiled, and then you can compile the jar package separately by mm to facilitate debugging.

Related Article

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.