Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jniLibs folder showing as cpp folder in Android Studio

Tags:

android

I'm following this tutorial.

I made a folder called jniLibs in app/src/main, and it shows when I see the folder in explorer.

However, when I open up Android Studio, I see that the app folder has 4 folders: manifests, java, cpp, res. Where did the cpp folder come from? Why can't I see the jniLibs folder in Android studio?

like image 585
Human Cyborg Relations Avatar asked Feb 18 '17 05:02

Human Cyborg Relations


1 Answers

First of all in general you can follow this procedure to create the jniLibs folder. I did it twice but in one of these attempts I experienced your same problem

I don't know the inner reason generating this issue but I came up with the following workaround to have jniLibs visible [again] in the Android view [tested on Android Studio 3.1.2]

1) at the beginning doing like in the linked answer got me to the point where in my Android view there was only an empty cpp folder without any jni or jniLibs folder visible

enter image description here

2) at this point I clicked on the cpp folder and I could see the jni folder [red rectangle in the screenshot]

enter image description here

3) click on it and it will automatically open the Project view where I can see the jni folder

enter image description here

4) right click on it -> Refactor -> Rename... and put jniLibs

enter image description here

5) now go back on your Android view and surprise!

enter image description here

Hope that this can help

like image 127
Antonino Avatar answered Oct 14 '22 23:10

Antonino