1

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?

0

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

Comments

2

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

0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.