Android Studio introduces Open Source Library

Source: Internet
Author: User

In the Android development process, we often need to introduce third-party open source project packages, but these projects are not all in the form of a jar package, GitHub download a lot of the source code package. Importing in Eclipse is easy, it's a little bit different in studio, It's very simple, actually.

1 First copy the library of the Open source project into our studio's engineering catalog, and it will be automatically refreshed in studio

2 Next you need to manually modify the project and directory under Settings.gadle add

Include ': App ', ': Yourlibraryname ' your library name

3. On the Module that needs to be introduced, right-click the Open module settings–>dependencies-> on the right of the + sign –>module library–> Select your class library

In fact, just add the following code to the module's Build.gradle

Dependencies {Compile project (': yourlibraryname')}

4. If there is an error, it is possible that the library's compilation environment is not correct, you can go into the library's build.gradle to modify the Gradle version

 'com.android.tools.build:gradle:1.0.1' see Studio support for Gradle Ben  }}

Android Studio introduces Open Source Library

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.