Mytheral Mytheral - 1 year ago 106
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?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download