How do I add a library project to Android Studio?

前端 未结 30 4910
梦谈多话
梦谈多话 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:47

    For Android Studio:

    Click on Build.gradle (module: app).

    And add for

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile files('libs/commons-io-2.4.jar')
    }
    

    and in your directory "app", create a directory, "libs". Add the file yourfile.jar:

    Finally, compile the Gradle Files:

提交回复
热议问题