0

Anyone can tell how to add external library and jar file in Android Studio, I know in Eclipse you can Right click -> Property -> Java Build Path, but what to do in Android Studio ?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Jackie
  • 84
  • 4
  • 2
    possible duplicate of [How do I add a library project to the Android Studio?](http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-the-android-studio) – Mogsdad Sep 17 '15 at 00:00

1 Answers1

1

For adding external library or dependency, you can either edit gradle file for app manually, or you can do it by Project Structure.

  • Edit Gradle File of app

Open gradle file of app, you can add/edit in the dependencies tag,

enter image description here

the first line compile fileTree(dir: 'libs', include: ['*.jar']) indicates that it will include the jar files in this project;

  • in Project Structure

File -> Project Structure, and in the pop-up window, click app in the left list, then click dependencies, in the top-right corner, click + to add new dependency.

enter image description here

Kai
  • 916
  • 1
  • 7
  • 10