Android Studio adds. So Library for engineering

Source: Internet
Author: User

1. Copy the file to libs.

2. Add at the Android level of the App/build.gradle file.

Sourcesets.main {
Jnilibs.srcdir ' Libs '
}

FAQ link http://stackoverflow.com/questions/24357687/how-to-include-so-library-in-android-studio/28430334#28430334

Solution 1:creation of a Jnilibs folder

Create a folder called "Jnilibs" into your app and the folders containing your *.so inside. The "Jnilibs" folder needs to being created in the same folder as your "Java" or "Assets" folders.

Solution 2:modification of the Build.gradle file

If you don ' t want to create a new folder and keep your *.so files into the Libs folder, it's possible!

In this case, just add your *.so files to the Libs folder (please respect the same architecture as the solution 1:libs /armeabi/.so for instance) and modify the Build.gradle file of the your app to add the source directory of the Jnilibs.

sourceSets {        main { jni.srcDirs = ["libs"] } }

You'll have the more explanations, with screenshots-to-help-here (Step 6):

http://blog.guillaumeagis.eu/setup-andengine-with-android-studio/

Android Studio adds. So libraries to the project

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.