I had the same issue. The problem was, in my parent (library) project's build.config's sourceSets I've added the following:
jniLibs.srcDirs = ['jniLibs']
jni.srcDirs = []
This didn't work, .so files were missing from the child project's APK, so I've replaced it with:
jni.srcDirs = []
jniLibs.srcDir 'src/main/jniLibs'
With this method, everything is fine.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…