libs folder doesn't work in android studio libs folder doesn't work in android studio android android

libs folder doesn't work in android studio


For every change you make to your libs folder (add, remove .jar) you need to sync your gradle files. Jar file libraries are not discovered automatically by AS - as it was with Eclipse.


Adding libraries to Android Studio 1.2

(1) Select the Packages view for the project(2) Drag your library (jar) file into the "libs" folder in Packages view(3) Right-click the newly added jar file - and select "Add as library" in the dialogue - Then click OK in next dialogue (Gradel Sync will start)


I don't know 'why' is fileTree option not working. But surprisingly, wildcard approach works.

dependencies {    compile files('libs/*.jar')}