Does nativescript supports .so file in android platform?

后端 未结 3 1879
鱼传尺愫
鱼传尺愫 2020-12-21 10:16

Recently we are using nativescript to build an app, and we need to use a third-patty library which provides both IOS and Android SDK. But it failed even we push .so file to

3条回答
  •  时光说笑
    2020-12-21 10:19

    A better way to push .so files and .jar files together, is to repackage them as an .aar file, using Android Studio. Then copy the wrapper .aar file to your nativescirpt platform/android/libs folder.

    Here are the steps to package your SDK .jar and .so files into an aar file.

    1. Create an application with blank activity in Android Studio.
    2. Create a new wrapper module yoursdkwrapper (New->New Module->Android Library).
    3. Copy your SDK .jar files to MyApplication\yoursdkwrapper\libs folder.
    4. Under your MyApplication\yoursdkwrapper\src\main\ folder, create the following directory structure and copy .so files to each of architecture folders: jniLibs/arm64-v8a, jniLibs/armeabi, jniLibs/armeabi-v7a, jniLibs/x86.
    5. yoursdkwrapper-debug.aar file will be generated in your MyApplication\epos2wrapper\build\outputs\aar.

提交回复
热议问题