Эмуляция Android Studio в Mac OS X - InflateException: двоичный XML (MapBox)

Это действительно конкретная проблема, поэтому ее трудно диагностировать.

У меня есть приложение для Android, которое работает на телефоне Android и правильно эмулируется на эмуляторе Windows 8.1 x86 (через Android Studio), но когда я запускаю его в эмуляторе x86 на моем Mac (OS X 10.11.1), оно запускается пока я не попытаюсь надуть активность картой MapBox.

Подводя итог, вот что работает / что я сделал:

  • Работает на Windows 8.1 Android Studio Emulator
  • Работает на Android 5.1 Moto X
  • На моем Mac установлен ускоритель эмулятора Intel x86 (HAXM)
  • Я использую эмулятор x86 через Android Studio для Mac

Эта ошибка возникает только при раздутии активности MapBox:

10-30 12:16:03.848 4557-4557/? I/art: Not late-enabling -Xcheck:jni (already on)
10-30 12:16:03.848 4557-4557/? I/art: Late-enabling JIT
10-30 12:16:03.852 4557-4557/? I/art: JIT created with code_cache_capacity=2MB compile_threshold=1000
10-30 12:16:05.276 4557-4611/com.example.example.thisapp I/GMPM: App measurement is starting up
10-30 12:16:05.278 4557-4611/com.example.example.thisapp E/GMPM: getGoogleAppId failed with status: 10
10-30 12:16:05.279 4557-4611/com.example.example.thisapp E/GMPM: Uploading is not possible. App measurement disabled
10-30 12:16:05.336 4557-4573/com.example.example.thisapp W/art: Suspending all threads took: 19.618ms
10-30 12:16:05.522 4557-4626/com.example.example.thisapp D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
10-30 12:16:05.528 4557-4557/com.example.example.thisapp D/: HostConnection::get() New Host Connection established 0xb401ca30, tid 4557
10-30 12:16:05.632 4557-4626/com.example.example.thisapp D/: HostConnection::get() New Host Connection established 0xaf8be1e0, tid 4626
10-30 12:16:05.658 4557-4626/com.example.example.thisapp I/OpenGLRenderer: Initialized EGL, version 1.4
10-30 12:16:05.693 4557-4626/com.example.example.thisapp W/EGL_emulation: eglSurfaceAttrib not implemented
10-30 12:16:05.693 4557-4626/com.example.example.thisapp W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xabe3a540, error=EGL_SUCCESS
10-30 12:16:11.189 4557-4557/com.example.example.thisapp D/AndroidRuntime: Shutting down VM
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime: FATAL EXCEPTION: main
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime: Process: com.example.example.thisapp, PID: 4557
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.example.thisapp/com.example.example.thisapp.MapsActivity}: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class com.mapbox.mapboxsdk.views.MapView
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:  Caused by: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class com.mapbox.mapboxsdk.views.MapView
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.setContentView(Activity.java:2166)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.example.example.thisapp.MapsActivity.onCreate(MapsActivity.java:79)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:6237)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.-wrap11(ActivityThread.java) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:  Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.mapbox.mapboxsdk.views.MapView
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:645)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.setContentView(Activity.java:2166) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.example.example.thisapp.MapsActivity.onCreate(MapsActivity.java:79) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:6237) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.-wrap11(ActivityThread.java) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:  Caused by: java.lang.reflect.InvocationTargetException
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Native Method)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:619)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.setContentView(Activity.java:2166) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.example.example.thisapp.MapsActivity.onCreate(MapsActivity.java:79) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:6237) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.-wrap11(ActivityThread.java) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:  Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.example.example.thisapp-2/lib/x86/libmapbox-gl.so: has text relocations
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.Runtime.loadLibrary(Runtime.java:372)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.System.loadLibrary(System.java:1076)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.mapbox.mapboxsdk.views.NativeMapView.<clinit>(NativeMapView.java:37)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.mapbox.mapboxsdk.views.MapView.initialize(MapView.java:593)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.mapbox.mapboxsdk.views.MapView.<init>(MapView.java:538)
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Native Method) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:619) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.setContentView(Activity.java:2166) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.example.example.thisapp.MapsActivity.onCreate(MapsActivity.java:79) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:6237) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.-wrap11(ActivityThread.java) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
10-30 12:16:11.199 4557-4557/com.example.example.thisapp E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
10-30 12:16:11.360 4557-4573/com.example.example.thisapp W/art: Suspending all threads took: 37.146ms
10-30 12:16:11.372 4557-4577/com.example.example.thisapp I/art: Background sticky concurrent mark sweep GC freed 9470(718KB) AllocSpace objects, 4(80KB) LOS objects, 48% free, 1890KB/3MB, paused 4.151ms total 202.120ms
10-30 12:16:11.407 4557-4577/com.example.example.thisapp W/art: Suspending all threads took: 34.815ms

Другие ответы об ошибках InflateException / Binary XML, которые я видел, не сработали или не применимы.

0 ответов

Другие вопросы по тегам