How do I add a library project to Android Studio?

前端 未结 30 3908
梦谈多话
梦谈多话 2020-11-21 04:24

How do I add a library project (such as Sherlock ABS) to Android Studio?

(Not to the old ADT Eclipse-based bundle, but to the new Android Studio.)

30条回答
  •  死守一世寂寞
    2020-11-21 04:52

    Here is the visual guide:

    Update for Android Studio 0.8.2:

    In Android Studio 0.8.2, go to Project Structure -> under Modules just hit the plus button and select Import Existing Project and import actionbarsherlock. Then synchronise your Gradle files.

    If you face the error

    Error: The SDK Build Tools revision (xx.x.x) is too low. Minimum required is yy.y.y

    just open the build.gradle file in actionbarsherlock directory and update the buildToolsVersion to the suggested one.

    android {
      compileSdkVersion 19
      buildToolsVersion 'yy.y.y'
    

    Android Studio 0.8.2


    Menu File -> Project Structure...:

    First

    Module -> Import Module

    Second

    After importing the library module, select your project module and add the dependency:

    Third

    And then select the imported module:

    Forth

提交回复
热议问题