How does Android. mk introduce third-party jar packages?

Source: Internet
Author: User

Using eclipse should be free of pressure on import jar, but many (for example, I) are used to compiling Android APK in Linux, in Linux, how does one compile an app with a third-party jar package?


The key lies in how to modify Android. mk.


Here is a code example:

.................

.................

.................

Local_src_files: = \
$ (Call all-Java-files-under, Src)

Local_package_name: = apk_name // your APK name

Local_static_java_libraries: = 3 rdpartlib // alias for Jar

Include $ (build_package)

.................

.................

.................

Include $ (clear_vars)


// Use the jar alias before the colon and the actual path of the JAR file.
Local_prebuilt_static_java_libraries: = 3 rdpartlib: lib/3rdpart. Jar

Include $ (build_multi_prebuilt)


The red part is what we need to add. Here we will share with you.

 

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.