在设备上找不到但在APK中存在的Gradle本机库 [英] Gradle native libraries not found on device but present in apk

查看:110
本文介绍了在设备上找不到但在APK中存在的Gradle本机库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用此处SDK

My application uses Here SDK and Twilio SDK. Both uses native libraries (Here SDK with native libraries locally plugged in from /libs and /jniLibs folders, Twilio SDK plugged in from jCenter). But on Android 5.1 Here SDK throws exception "MISSING LIBRARIES: libMAPSJNI.so" although this library present in result APK. I opened folder where my program is installed on device and compared content in two cases: with or without Twilio SDK. The difference is that when connected Twilio API folder /lib is a file, and for obvious reasons, the loader can not see inside it native libraries needed initialize Here SDK. If remove the Twilio gradle dependency the assembly occurs normally. What could be a reason and how to fix it? If needed I can attach test project with these libs

推荐答案

您需要像这样修改 build.gradle :

android {
    (...)
    splits {
        abi {
            enable true
            reset()
            include 'armeabi-v7a'
            universalApk false
        }
    }
    (...)
}

可能是因为Twilio SDK支持x86,而HERE SDK当前不支持它.

It's probably because Twilio SDK supports x86 and HERE SDK currently doesn't support it.

这篇关于在设备上找不到但在APK中存在的Gradle本机库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆