I have an android project and use Android Studio as IDE. How can I add external jar's to the build path or how can I use them?
My project is libGDX based, so I haven't libs folder in root.
1 Answer
The jar I was importing had been compiled/exported with Java 7 in mind. Once I enabled compliance with Java 6 it worked fine.
To sum it up, when adding an external jar file in Android Studio:
- Copy jar to root/project/libs folder; 2.Right-click and add as library; 3.Add the jar to root/project/build.gradle (something like compile files('libs/test-jar-to-import.jar')); 4.Make sure the imported jar complies with Java 6 (7 will not do, for now).