Mytheral Mytheral - 11 months ago 51
Android Question

Android Studio 2.2 (Beta) - How do I add a jar file in this version?

So I installed Android Studio 2.2 (beta) and there isn't the option to add a directory and left me with the options of adding a Module or Resource Directory. So I'm wondering how I add in a jar file (protobuf) into my project.

Noy Noy
Answer Source

Open a folder called libs. Paste your .jar file there. Open gradle module and paste this :

compile fileTree(dir: 'libs', include: '*.jar')

Now every sync your new .jar file in the libs folder will be synced with your project. This is taken from a similiar post : Android Studio: Add jar as library?