Android NDK generates so packages of multiple CPU types, androidndk

Source: Internet
Author: User

Android NDK generates so packages of multiple CPU types, androidndk

1. Please refer to my blog http://blog.csdn.net/changcsw/article/details/41491257 to install cygwin Environment

2. Please refer to my blog http://write.blog.csdn.net/postedit/8983907 to complete basic ndk simple generation only supports so package of armeabi

3. Generate so packages that support multiple CPU types

Find the android-ndk-r9d \ samples \ hello-jni \ jni file in the directory corresponding to the ndk directory and copy it to the jni directory in your project

Open the Application. mk file and you can see APP_ABI: = all.

If you do not change it, The so files of the armeabi, armeabi-v7a, x86, and mips types are generated under the lib directory. If a warning is reported:

WARNING: APP_PLATFORM android-19 is larger than android: minSdkVersion 8 in./AndroidManifest. xml

 

You only need to add the following sentence to the Application. mk file: APP_PLATFORM: = android-8.

Of course, sometimes only need armeabi, armeabi-v7a CPU type support, there is no need to generate other, then as long as

In the Application. mk file, change APP_ABI: = all to: APP_ABI: = armeabi armeabi-v7a.

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.