简体   繁体   中英

Rendering Library error in Android project

I'm trying to use an external library in my Android application. After Android Studio updated I had a problem with the project debugging and a layout configuration with 3rd party library.

There are logs below:

java.lang.UnsatisfiedLinkError: no cache in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
    at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    at java.lang.System.loadLibrary(System.java:1088)
    at ru.yandex.core.CoreApplication.initialize(Unknown Source)
    at ru.yandex.core.CoreApplication.initOnce(Unknown Source)
    at ru.yandex.yandexmapkit.MapSurfaceView.init(Unknown Source)
    at ru.yandex.yandexmapkit.MapSurfaceView.<init>(Unknown Source)
    at ru.yandex.yandexmapkit.MapView.<init>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:413)
    at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
    at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:177)
    at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:214)
    at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:142)
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:413)

Welcome to StackOverflow, this error happens when we load native libraries (.so) in this case your 3rd party library and basically this is the explanation:

When you load native libraries like .so on Linux or .dll on Windows using System.loadLibrary() Java looks for those shared library in both PATH environment variable and java.library.path system property, If it doesn't find shared library it throws "Exception in thread "main" java.lang.UnsatisfiedLinkError: no XXX dll in java.library.path".

Read more: http://javarevisited.blogspot.com/2012/03/javalangunsatisfiedlinkerror-no-dll-in.html#ixzz3bHkcLC27

In Android the problem is mainly generated because that native libraries are not accesible to your program, check permissions and paths are correct!.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM