简体   繁体   中英

Can I convert an empty project in C++ to an android app through Visual C++?

Like I want to convert a C++ project that I made in VS to an android app. And I found out that there is a Visual C++ android development kit available in VS. So will there be any need of using Java? (as building an android app usually requires)

You can indeed create a Visual Studio project that uses the Android NDK to build an Android app from pure C++ code. The C++ code is compiled into a library that a little bit of Java glue code calls into, and this combination, along with your resources, is packaged into an .APK that you can install. You don't have to edit or otherwise modify the Java code at all; all your program logic can be in C++.

Technically speaking, you can't easily convert an existing VS project into an Android project, but you can copy your code into a new project that creates an Android app, or copy it into a shared code project that is picked up by a project that creates a library for Android that you can call from an app written in either Java or C++. The project templates in VS give simple examples of doing each of these things.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM