How to add 'libs' folder in Android Studio?

152.5k views Asked by At

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.

8

There are 8 answers

4
dangalg On BEST ANSWER

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

0
AudioBubble On

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...

0
Rajni Gujarati On
  1. Open Android Studio, and click File > Project Structure.
  2. Redirect to Project Settings > Module.
  3. Select yourProjectName_android and remove it by clicking (-) minus sign shown on above.
  4. Now click on yourProjectName and click on + Add Content Root and just provide the path of your project.
  5. Just Apply and Ok.
  6. Restart your android studio.
0
user3550270 On

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.

0
suba On

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

0
Cristiana Chavez On

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

0
user3419036 On

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

2
jim On

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