简体   繁体   English

从VS2013 C ++代码创建APK文件

[英]Creating APK file from VS2013 C++ code

I have developed a library for Windows in VS2013. 我已经在VS2013中为Windows开发了一个库。 It does not have a GUI, only (mathematical) code. 它没有GUI,只有(数学)代码。

I would now like to create an APK file so that I can use my library on Android. 我现在想创建一个APK文件,以便可以在Android上使用我的库。

I hope that I don't have to re-write everything from scratch for Android. 我希望我不必从头开始为Android重新编写所有内容。

What would currently be the best solution so that I can keep most of my C++ files while creating the APK? 当前什么是最好的解决方案,以便在创建APK时可以保留大多数C ++文件?

Thank you for the help! 感谢您的帮助!

You can compile your library with the Android NDK , which produces a .so file. 您可以使用Android NDK编译您的库,后者会生成一个.so文件。

Android applications are written in Java. Android应用程序是用Java编写的。 To use your library, you should first load your .so library and then you can access its function via JNI . 要使用您的库,您应该首先加载.so库 ,然后可以通过JNI访问其功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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