Android studio-referencing jars and so files

Source: Internet
Author: User

I. Referencing a JAR file
1. Copy and paste the jar file into the Libs directory of the app;
2. Right-click on the jar file and click "Add as Library" in the pop-up menu to add the jar file as a class library to the project;
3. Select the specified class library.
Note: If you do not perform step 2, 3, the jar file will not work and cannot be referenced using the import statement.


Ii. citation of so files
There are many ways to quote so files on the web, most of which are cumbersome, and find an easy way out of Kyle Thielk's blog.
1. Create a new directory named "Jnilibs" in the "Src/main" directory;
2. Copy and paste the so file into the "Jnilibs" directory.
Note: If the so file is not referenced, it may fail to load the class library when the program executes, with a debug prompt similar to the following:
java.lang.UnsatisfiedLinkError:Couldn ' t load library xxxx from loader Dalvik.system.PathClassLoader



Transferred from: http://www.cnblogs.com/xrwang/p/AndroidStudioImportJarAndSoLibrary.html

Android studio-referencing jars and so files

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.