Android Studio, Adding Native C++ Code via JNI to a Second Activity of an Android App

  android-studio, c++, j, java-native-interface, kotlin

I’m using Android Studio to build an Android app. I’m using Kotlin, and I’m using C++ code, i.e. native C++ that I interface with using JNI. I’m able to do this in the MainActivity, because Android Studio offers this build in their setup. However, I can’t figure out a way to call native C++ functions from a second empty activity that I created. Does anyone know how to set up a second activity to access native C++ code?

Thanks for any help!

Source: Windows Questions C++

LEAVE A COMMENT