234

I need help in creating the 'libs' folder in Android Studio for my project (It is not auto-generated in my project).

When I want to create a folder, it gives me lots of options, like AIDL, Assets, JNI, Java, Java Resources, Renderscripts, and 'res' folders. I chose Res and added a libs folder but it didn't show up on my file structure on the left.

Can anyone help me?

I wanted to add a JAR file but I can't find libs to put in.

Danzeeeee
  • 2,588
  • 2
  • 16
  • 18
  • just create it from a file explorer, it should work! – rupps Nov 16 '14 at 12:45
  • Can you teach me in details? I have no idea where to create in. Here is my dir : C:\Users\Juicy\Desktop\Utranslator\app\src\main\res Is it here? – Danzeeeee Nov 16 '14 at 12:51
  • It still does not show in my Android Project on my left hand side in Android Studio. I cant use my jar – Danzeeeee Nov 16 '14 at 12:53
  • 1
    then create the folder **libs** into **c:/users/juicy/desktop/Utranslator/app/** ... It should show up, I think there's an icon to refresh the tree. Also, copy the library right away into the created dir with the file explorer, exit and re-run Android Studio – rupps Nov 16 '14 at 12:54
  • Sorry to say that its still not working. The libs file is like invisible in Android Studio but it exists in File Explorer – Danzeeeee Nov 16 '14 at 12:58
  • sorry to hear that, unfortunately I cant be of much help because I dont have android studio installed at the moment, however there should be a refresh button somewhere! wish you luck! – rupps Nov 16 '14 at 15:21
  • Could you accept one of reply as "answer". – bianca Mar 31 '15 at 16:13

7 Answers7

546

The solution for me was very simple (after 10 hours of searching). Above where your folders are there is a combobox that says "android" click it and choose "Project".

enter image description here

030
  • 10,842
  • 12
  • 78
  • 123
dangalg
  • 6,398
  • 4
  • 27
  • 37
  • 2
    yeah they did hide that folder. If the font for the library names are in orange does it have any meaning? Looking to end this torture... – Someone Somewhere Mar 30 '15 at 21:24
  • Thanks for the answer. But can I get an explanation as to why it doesn't show up in the Android heading? – Isaac Zais Apr 17 '15 at 16:54
  • 2
    wow.. and here I was wondering why there were so many ways to view my project. This combobox is just a combo of stupidity and needlessness in my opinion. How Eclipse did it before worked, just show us everything! Props for giving us the solution! – publicknowledge Aug 13 '15 at 03:48
  • Thanks. Solved the issue. It's hilarious, that this view isn't the standard view in a Flutter project when you just created - a Flutter project. Maybe, there is a bit of work for the responsible developers here to be done...? – themightyhulk Feb 28 '22 at 20:51
215

Click the left side dropdown menu "android" and choose "project" to see libs folders

enter image description here

*after choosing project you will see the libs directory

Cristiana Chavez
  • 11,349
  • 5
  • 55
  • 54
14

libs and Assets folder in Android Studio:

Create libs folder inside app folder and Asset folder inside main in the project directory by exploring project directory.

Now come back to Android Studio and switch the combo box from Android to Project. enjoy...

7

also, to get the right arrow, right click and "Add as Library".enter image description here

jim
  • 228
  • 4
  • 10
5

Another strange thing. You wont see the libs folder in Android Studio, unless you have at least 1 file in the folder. So, I had to go to the libs folder using File Explorer, and then place the jar file there. Then, it showed up in Android Studio.

user3550270
  • 51
  • 1
  • 3
4

also you should click right button on mouse at your projectname and choose "open module settings" or press F4 button. Then on "dependencies" tab add your lib.jar to declare needed lib

user3419036
  • 251
  • 2
  • 5
3

You can create lib folder inside app you press right click and select directory you named as libs its will be worked

suba
  • 69
  • 5