如何连接或使用 NDK 和 Nativescript vuejs

How connect or use NDK and Nativescript vuejs

我有一个项目,我们想要访问指纹扫描仪(外部扫描仪)。驱动程序是用 c++ (NDK) 编写的。

原生脚本是否支持访问原生组件?

GitHub 上的 NativeScript 存储库中有几个关于此的问题,所有问题都导致 this issue 解决方案是从 CPP 文件创建 AAR 文件并从 NativeScript 加载它。

我也a detailed guide找到了如何做,这里是作者总结的主要步骤:

  • Create an Android library using Android Studio
  • Import the native C++ library and wrap the code we want to export into a Java class, using JNI
  • Export the library to a aar file, and import it into a new NativeScript plugin
  • Import the plugin into a new NativeScript application