UnsatisfiedLinkError: dalvik.system.PathClassLoader [英] UnsatisfiedLinkError: dalvik.system.PathClassLoader
问题描述
我正在为 AndroidTV 制作应用程序并收到错误
I'm making an application for AndroidTV and get the error
java.lang.UnsatisfiedLinkError:
dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/mytv.mytv-2/base.apk"
在装有 Android 6.0.1 的 NexusPlayer 上.好奇它适用于搭载 Android 5.1.1 的智能电视.
on a NexusPlayer with Android 6.0.1. Curious that it works on a smart TV with Android 5.1.1.
全文错误为:
java.lang.UnsatisfiedLinkError:
dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/mytv.mytv-2/base.apk"],nativeLibraryDirectories=[/data/app/mytv.mytv-2/lib/x86, /data/app/mytv.mytv-2/base.apk!/lib/x86, /vendor/lib, /system/lib]]]
couldn't find "libnmpsdk.so"
如果有帮助.
(jniLabs 可以使用 2 个文件夹 armeabi 和 armeabi-v7a,每个文件夹都有 libnmpsdk.so)
(jniLabs is fine with 2 folders armeabi and armeabi-v7a and each one has libnmpsdk.so)
日志显示的错误行有这部分代码:
The error line that log is showing me has this part of code:
static {
System.loadLibrary("nmpsdk");
}
如果有人遇到过这个问题,请告诉我,我还没有找到任何可以解决它的方法.
If anyone had encountered this problem please let me know, i haven't found anything that solves it yet.
提前致谢.
推荐答案
所以这是 UnsatisfiedLinkError 对于我的情况的解决方案,但我认为它是通用的.
So this is the solution for UnsatisfiedLinkError for my case but I think it's general.
在 gradle.properties 这一行中放入
Put in gradle.properties this line
android.useDeprecatedNdk=true;
在 build.gradle 中 defaultConfig 字段中的这一行
and in build.gradle this line in defaultConfig field
ndk {
abiFilters "armeabi", "armeabi-v7a"
}
这篇关于UnsatisfiedLinkError: dalvik.system.PathClassLoader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!