Import open-source libraries to projects built based on Android Studio

Source: Internet
Author: User

Import open-source libraries to projects built based on Android Studio

Since Google released the official version of Android Studio 1.0, more people have migrated to Android Studio for development. However, many open-source libraries and controls on the Internet were developed based on Eclipse in the past. Many people do not know how to import them to their Android Studio-based projects. I am also personally reminded on Weibo, let me write it. It's just early today. Let's write it. This section mainly introduces some common guide scenarios.

Preface

 
 
  1. -- Project // project directory
  2. |
  3. Build. gradle // the project's gradle configuration file
  4. |
  5. Settings. gradle // gradle settings. All modules are saved.
  6. |
  7. App // module Directory
  8. |__ Configuration of build. gradle module
  9. |
  10. Module2 // module2 directory
  11. |__ Configuration of build. gradle module

Similar to projects in eclipse, gradle/android studio can also have a module, put moudle under the project directory, and then in settings. add this module to gradle. The simplest method is to use the folder name. For example, in the above structure, the build. gradle file should be as follows:

 
 
  1. include ':app', ':module2' 

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.