How to import library ?

Android Studio:git

  • Download or git the library. (for example: the library folder named ActionBarSherlock)
  • Create a folder named libraries in your root directory of project.
  • Copy & Paste the library into libraries.
  • On the root of your project, modify setting.gradle (if not exist, create it), add this library.gradle

    include(‘:libraries:ActionBarSherlock’)ui

  • Edit your project’s build.gradle, tell gradle to compile your added library,add below code in the dependencies tag.this

    compile project(:libraries:ActionBarSherlock)code

  • Run gradle clean && gradle assemble on your root project.ci

相關文章
相關標籤/搜索