Home android Introduction C++ project in Android Studio

Introduction C++ project in Android Studio

Author

Date

Category

worked with OpenCV on C++, now it’s time to do it on android. How to connect the old C++ project to jni?


Answer 1, Authority 100%

  1. Download NDK – Native Development Kit
  2. set ndk – specifically decide on toolchain
  3. Plant your source in Tree SRC / JNI
  4. Write make Make files for building sources: Application.mk and Android.mk
  5. Register in Gradle rules of construction (I do not use it – therefore I will not tell you, I usually collect from the command line)
  6. Write JNI Interfaces – Bundles between C++ and Java code
  7. Collect, in the end you will receive 3 or 4 lips for different platforms: ABI x86 , arm , etc.

Perhaps the instruction is slightly outdated, I have not codified C++ under Android

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions