C + + mk File Error JNI call generates JAVA.LANG.UNSATISFIEDLINKERROR error resolution _android

Source: Internet
Author: User

Error is:

ANDROID.MK file

The call method for C + + is:

Copy Code code as follows:

Local_path: = $ (call My-dir)

Include $ (clear_vars)

Local_module: = Testndk

Local_cpp_extension: =com_ndk_test_jniclient.cpp

Include $ (build_shared_library)

The calling method in C:

Copy Code code as follows:

Local_src_files: = com_ndk_test_jniclient.c

Another method that uses a variable that has been successfully run

C + + correct MK files:

Copy Code code as follows:

Local_path: = $ (call My-dir)

Include $ (clear_vars)

Local_module: = TestSm3

ls_cpp=$ (subst $ (1)/,,$ (wildcard $ (1)/*.cpp))

Local_src_files: = $ (call ls_cpp,$ (Local_path))

Include $ (build_shared_library)

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.