Android so library multi-platform referencing third-party so libraries, and multi-platform compilation

Source: Internet
Author: User

1, Eclipse new Android project, add JNI directory, configure NDK

The reference source file directory of the new third-party library under the 2,jni directory, including the so package for each platform and the corresponding header file

3, Configuration Android.mk


The configuration files referenced by the third party libraries are as follows:

Local_path: = $ (call My-dir)

include $ (clear_vars)

Local_module:= Reference Library alias

local_src_files:=$ (target_arch_abi)/reference library file name. So

include $ (prebuilt_shared_library)



Main reference android.mk file contents:


Top_local_path:=$ (call My-dir)

include $ (call all-subdir-makefiles)


Local_path: = $ (top_local_path)


include $ (clear_vars)

local_module:= Generate library file name

Local_shared_libraries:= \

Referencing library aliases

Local_src_files:=\

Xxxx.cpp\

XXXX.cpp

Local_ldlibs +=-llog

include $ (build_shared_library)


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6D/11/wKioL1Vb8-PgXQbIAACQNRwWOdQ199.jpg "title=" Tmp167e1b59.png "alt=" Wkiol1vb8-pgxqbiaacqnrwwodq199.jpg "/>


So library compile command:

Ndk-build app_abi= "Armeabi armeabi-v7a x86 MIPS"


Android so library multi-platform referencing third-party so libraries, and multi-platform compilation

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.