I was wondering if writing apps in C++ in Android Studio is possible. I have some knowledge in creating apps in Java but I am more comfortable with C++, and is this a complicated process?
3 Answers
You can use Qt and create Android apps with C++ (http://doc.qt.io/qt-5/androidgs.html). To setup Android Studio with Qt https://wiki.qt.io/Android
Comments
You can add C and C++ code to your Android project by placing the code into a cpp directory in your project module.
When you build your project, this code is compiled into a native library that Gradle can package with your APK.
Your Java or Kotlin code can then call functions in your native library through the Java Native Interface (JNI). If you want to learn more about using the JNI framework, read JNI tips for Android.
Comments
You can also use JNI to run c++ code (as a matter of fact c++ shared library or so) from Java.
Here you can find a usefull article + sample for how to do it.