JniLibs are not extended in gradle

An Android application has two modules and one depends on the other, and the common banks and its own libraries are defined in parent-project, and child-projectadd it as a dependency in build.gradle:

enter image description here

However, after I built child-project, I found that jarsput insiede was parent-projectcopied to apk, but the native libraries were not. Only internal libraries inside are child-projectpackaged in apk.

What's happening?

With Android studio 1.0.2.

+4
source share
1 answer

I had the same problem. The problem was that in my parent (library) project build.config sourceSets I added the following:

jniLibs.srcDirs = ['jniLibs']
jni.srcDirs = []

, APK, :

jni.srcDirs = []
jniLibs.srcDir 'src/main/jniLibs'

.

+7

All Articles