Android Studio - no way to associate C ++ with Gradle

I am trying to access some CPP libraries from android and follow the instructions here:

https://developer.android.com/studio/projects/add-native-code.html#link-gradle

The problem is that there seems to be no โ€œC ++ project link with Gradleโ€ option when I right-click on the application module. Has anyone else had this problem? Have you decided this?

+6
source share
1 answer

Check your build.gradle file for your application module. Mine was like the default Android project:

externalNativeBuild { cmake { path "CMakeLists.txt" } } 

I deleted the cmake section and ran the project again, and then finally the โ€œLink C ++ Project with Gradleโ€ project was available.

+13
source

Source: https://habr.com/ru/post/1012177/


All Articles