How can I add .so files to an android library project using gradle 0.7+

后端 未结 4 805
别跟我提以往
别跟我提以往 2020-11-30 02:24

Project structure:

App project --> depends on Library project

Library Project has a folder for the compiled jni libs

jniLibs.srcDirs = [\'li         


        
4条回答
  •  广开言路
    2020-11-30 03:09

    In the end I didnt need to use product flavours.

    For the library project I added the following:

    android {
        sourceSets {
            main {
                jniLibs.srcDirs = ['libs']
            }
        }        
    }
    

    The libs folder had a folder inside called "armeabi-v7a" and as this is my only target it worked a treat.

    The ndk files (.so) are propagated into the android project that is using the android library project.

提交回复
热议问题