BoazGarty BoazGarty - 1 month ago 22
Android Question

SO files are not recognise after updating to new build gradle 2.2.2 and gradle-wrapper - 2.14.1-all.zip

It seems that the SO files are not being recognised when updating the build gradle to 2.2.2 and gradle-wrapper to 2.14.1-all.zip which enables instant run.
the app launches but when need to use native code it crashes.
when I revert to version 2.1.3 it works with no problem.

my so files located under main/jniLibs and my build gradle contains:

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


Im using armeabi and armeabi-v7a:

project.ext.versionCodes = ['armeabi':1, 'armeabi-v7a':2]


any idea what can cause this problem?

Answer

I fixed the problem by adding:

 splits {
        abi {
            enable true
            reset()
            include "armeabi", "armeabi-v7a"
        }
    }

in previous gradle versions it wasn't mandatory, seems that in 2.2.2 you should specify the ABI.

Comments