Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

How to add Parse .jar file to libs in android studio?

I want to use Android Studio as opposed to Eclipse for this app, but I am having trouble adding the jar file to libs.

The error says that the .jar is read-only.

I look at the properties of .jar file, and it is not read-only.

Any ideas on how to fix this and add the .jar file?

3 Answers

Ankit Patel
Ankit Patel
3,685 Points

you can copy and paste your jar file in libs folder.

then on build.gradle file just add dependency like this

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

Harry James
Harry James
14,780 Points

I had the same issue but I managed to find a workaround. Instead of dragging the jar file in, try copying it and then right clicking on the libs folder and pasting it in. This worked for me.

I guess it's a bug with Android Studio at the moment and will hopefully be fixed soon :)

Thanks!