Reputation: 1870
I am running Android Studio 2.1. I have created a new blank activity project.
I have set the proper locations of the SDK, JDK, and NDK in project configuration.
I then right clicked on the 'app' folder and hit 'create new c++ class'.
I then entered a name for it called "SquareIt". Everything in the dialog is filled out, yet the 'OK' button is still greyed out and I can not click it.
Upvotes: 4
Views: 2854
Reputation: 187
In Menu Bar [View]--[Tool windows]--[Project], change this drop-down box to [Project] instead of default [Android],then you can create you c++ class without encounter the 'OK' button problem.
P.S. My android studio version is 2.3.3.
Upvotes: 8
Reputation: 21
In Android Studio, right click the module name and add a new JNI folder. (New->Folder->JNI Folder).
Then right click on the newly created folder and add your c++ file from there.
Upvotes: -1