Yandex Maps不适用于Genymotion和一些设备

时间:2015-11-24 12:16:03

标签: android device yandex-maps

我用

实施了活动

ru.yandex.yandexmapkit.MapView

当我在华硕zenfone或三星Note 3上发布此活动时,它可以! 但是当我在Genymotion虚拟设备上启动时,它会抛出异常

android.view.InflateException: Binary XML file line #9: Error inflating class ru.yandex.yandexmapkit.MapView

在其他一些设备上也存在同样的问题(nexus 2013)

如何更正此例外?

这是XML

<ru.yandex.yandexmapkit.MapView
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:apiKey="1234567890" />

这是例外

' 11-24 12:06:46.125 314-341/? E/Genymotion: Could not open /sys/class/power_supply/genymotion_fake_path/present'
    11-24 12:06:46.277 1008-1008/? D/OpenGLRenderer: TextureCache::get: create texture(0xb7e8d638): name, size, mSize = 143, 324, 179740
    11-24 12:06:46.329 1008-1008/? D/DrawerOnClickListener: drawer item with position 1 clicked
    11-24 12:06:46.329 123-197/? W/genymotion_audio: out_write() limiting sleep time 46802 to 39909
    11-24 12:06:46.381 1008-1008/? D/AndroidRuntime: Shutting down VM
    11-24 12:06:46.381 1008-1008/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa625b288)
    11-24 12:06:46.401 1008-1010/? D/dalvikvm: GC_CONCURRENT freed 557K, 12% free 8893K/10055K, paused 13ms+1ms, total 18ms
    11-24 12:06:46.409 123-197/? W/genymotion_audio: out_write() limiting sleep time 58911 to 39909
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime: FATAL EXCEPTION: main
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime: android.view.InflateException: Binary XML file line #9: Error inflating class ru.yandex.yandexmapkit.MapView
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:613)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at kz.kazdream.shanyraq.fragment.MapFragment.onCreateView(MapFragment.java:69)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1026)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:615)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:92)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:137)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:4745)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:511)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:  Caused by: java.lang.reflect.InvocationTargetException
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Constructor.constructNative(Native Method)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:587)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at kz.kazdream.shanyraq.fragment.MapFragment.onCreateView(MapFragment.java:69) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1026) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:615) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:92) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:137) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:4745) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:511) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:  Caused by: java.lang.UnsatisfiedLinkError: Couldn't load cache: findLibrary returned null
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.Runtime.loadLibrary(Runtime.java:365)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.System.loadLibrary(System.java:535)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at ru.yandex.core.CoreApplication.initialize(Unknown Source)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at ru.yandex.core.CoreApplication.initOnce(Unknown Source)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at ru.yandex.yandexmapkit.MapSurfaceView.init(Unknown Source)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at ru.yandex.yandexmapkit.MapSurfaceView.<init>(Unknown Source)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at ru.yandex.yandexmapkit.MapView.<init>(Unknown Source)
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Constructor.constructNative(Native Method) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:587) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at kz.kazdream.shanyraq.fragment.MapFragment.onCreateView(MapFragment.java:69) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1026) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:615) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:92) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:137) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:4745) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:511) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
    11-24 12:06:46.417 1008-1008/? E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:4)

Yandex MapKit不适用于x86;为了避免这种情况,x86设备/仿真器应该模拟ARM架构。

链接:Genymotion | Installing ARM Translation

Github问题:https://github.com/yandexmobile/yandexmapkit-android/issues/74