Scorb
Scorb

Reputation: 1870

Can no create new C++ class in Android Studio

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

Answers (2)

Andy.G
Andy.G

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.

Change this drop-down box to Project

Upvotes: 8

Zenix
Zenix

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

Related Questions