AndroidAndroid Studio

Add jar as library to Project, Android Studio

Add Jar file to a Project in Android Studio

Here are the steps to adding Jar file to a Project in Android Studio

  • Put the jar file into the libs folder

add jar

  • Right click on jar file and select ‘Add as library’.

library_add-3

  • It’ll show a dialog showing modules in the project. Select a module to which you want add jar file.

library_add-4

  • Android Studio, automatically writes compile files('libs/<yourjarfile>.jar'); in gradle file dependencies and starts syncing and build file. And you are ready to use jar file classes.
  • If you see any issues, do a clean build might fix the issue.

Hope it helps somebody…

🙂

You may also interested in

Leave a Reply

Your email address will not be published.