Adding external library in Android studio 0.3.6

前端 未结 6 971
[愿得一人]
[愿得一人] 2020-12-13 13:42

So I am fairly new to Java, and I am trying to add this library to my project. The problem is that Android studio 0.3.6 doesn\'t have a simple way of doing that and all the

6条回答
  •  臣服心动
    2020-12-13 14:07

    Using Android Studio 0.8.2, I had to do the following (supposing the library you're trying to add is called MyExternalLib):

    1. In the "app/libs" folder on the hard disk, create a sub-folder "MyExternalLib", and copy the external library into that folder.
    2. In the file "app/build.gradle", inside the block named "dependencies", add the line compile project('libs:MyExternalLib')
    3. In the file "settings.gradle", add the line include ':app:libs:MyExternalLib'
    4. Click the button "Sync Project with Gradle Files"

提交回复
热议问题