Android source code compilation jar package difference between Build_java_library and Build_static_java_library (ii)

Source: Internet
Author: User

The difference between build_java_library and build_static_java_library compiled jar packages is briefly described above.

So if you get a jar package with the DEX format, and you just need this jar package to be imported into eclipse for development,

Do not have the source of this jar package, or have source code, but there is no Android source code compilation (mm) environment, how to do?

This time Google Android anti-compilation tool (Dex2jar, I am too lazy, do not provide download link) is useful,

Use this artifact to convert the Dex file (classes.dex) inside the jar package to a new jar package, open it with decompression, and so on.

It can be found that the file inside is a separate Java class file, quickly import eclipse, found that it can be used normally.

This time, if you have build_static_java_library compiled jar package (hi!). Didn't you say no? ),

Contrast, found that the artifact converted from the jar is smaller than compiled, think of a way to let the two jar package inside the method of the error (the specific instance is free to lift, this lazy ...) Hopeless),

Can see, the file small jar error unexpectedly no code line number display, guess this is why the file is one of the reasons for small, equivalent to C + + compiled Lib library debugging information is gone.

PS: Essays are lazy people think of writing, around no development environment demonstration, write down mainly for their own memo, if someone really need more detailed information, messages such as see must timely reply:)

Android source code compilation jar package difference between Build_java_library and Build_static_java_library (ii)

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.