Nativescript-cli: Question : how to add *.so files to custom plugin

Created on 18 Oct 2016  路  7Comments  路  Source: NativeScript/nativescript-cli

Any development on *.so files ?

Manually copying them into platform/android works. But any other ways?
http://stackoverflow.com/questions/33737385/does-nativescript-supports-so-file-in-android-platform/40099408

Most helpful comment

@wallezhang disregard my earlier comment.
This is where .so files should be included in your plugin:

`--platforms
`----android
`------jniLibs
`--------x86
`--------armeabi-v7a
`--------arm64-v8a

All 7 comments

@matart15 Has including the *.so files in <yourplugin>/lib/<arch>/ not worked for you?

Oh sorry. Forgot to close this. Plugin/libs worked.

@Pip3r4o I put the *.so files in <myplugin>/lib/x86/, but it's not worked for me. Unless i manually copy *.so files into platform/android/libs/jni.

I find in the build.gradle file

sourceSets.main {
        jniLibs.srcDir "$projectDir/libs/jni"
    }

define the jniLibs path.

@wallezhang disregard my earlier comment.
This is where .so files should be included in your plugin:

`--platforms
`----android
`------jniLibs
`--------x86
`--------armeabi-v7a
`--------arm64-v8a

@Pip3r4o It's worked! Thanks for your helping.

@Pip3r4o Thank you very much Peter, it would be awesome that this is added under docs, spent two days trying to find solution on how to import so libraries used in my plugin :)

@davorpeic we'll make sure to include it, thanks for your feedback.

Was this page helpful?
0 / 5 - 0 ratings