-
Notifications
You must be signed in to change notification settings - Fork 1.3k
armeabi is not work on armv7 devices #3985
Comments
Can you tell us what version of the Mapbox Android SDK that the app is using? Version
If you're looking to ship smaller versions of your app's .apk files, I'd recommend exploring different /cc @mapbox/support |
Thank you for your replay, My mapbox android sdk version is 3.1.0, It's already ships with support for the following ABI:
My problem is that: why armeabi "so" lib of mapbox is not work on armv7 devices? "so" of armeabi can also be work on armv7 devices usually, But if i compile armeabi folder of mapbox only, without armeabi-v7 folder by |
@Trinea This is my understanding as well, Independently, I'd also like to recommend the solution @bleege mentions above to reduce the size of your SDK. Shipping different APK split by ABI will guarantee that your users will take advantage of newer devices' CPU capabilities. |
@zugaldia yes we only compile armeabi for all devices. It's our project remaining problem, and we have not time to fix it now. Our appstore does not support apk-split, we donnot use Google Play. |
@Trinea thank you for the feedback, this is very useful. Could you point us at the device you're using to reproduce this empty map issue? |
ndk { on Nexus 5 |
@Trinea Could you tell us about other dependencies that the app is using? Specifically, are there any other |
Just confirming that the TestApp shows the following crash on a Nexus 5 if we include the filter indicated above: 03-14 17:23:14.458 12684-12684/? I/art: Late-enabling -Xcheck:jni
03-14 17:23:14.513 12684-12684/com.mapbox.mapboxsdk.testapp W/System: ClassLoader referenced unknown path: /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: java.io.FileNotFoundException: /jacoco.exec: open failed: EROFS (Read-only file system)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.output.FileOutput.openFile(FileOutput.java:67)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.output.FileOutput.startup(FileOutput.java:49)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.Agent.startup(Agent.java:122)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.Agent.getInstance(Agent.java:50)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.Offline.<clinit>(Offline.java:31)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at com.mapbox.mapboxsdk.testapp.MapboxApplication.$jacocoInit(MapboxApplication.java)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at com.mapbox.mapboxsdk.testapp.MapboxApplication.<init>(MapboxApplication.java)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at java.lang.Class.newInstance(Native Method)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.Instrumentation.newApplication(Instrumentation.java:996)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.Instrumentation.newApplication(Instrumentation.java:981)
03-14 17:23:14.533 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.LoadedApk.makeApplication(LoadedApk.java:573)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread.-wrap1(ActivityThread.java)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.os.Looper.loop(Looper.java:148)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at java.lang.reflect.Method.invoke(Native Method)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: Caused by: android.system.ErrnoException: open failed: EROFS (Read-only file system)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.Posix.open(Native Method)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
03-14 17:23:14.534 12684-12684/com.mapbox.mapboxsdk.testapp W/System.err: ... 21 more
03-14 17:23:14.548 12684-12704/com.mapbox.mapboxsdk.testapp D/LeakCanary: Could not attempt cleanup, leak storage not writable.
03-14 17:23:14.624 12684-12684/com.mapbox.mapboxsdk.testapp W/LocationServices: Location Permissions Not Granted Yet. Try again after requesting.
03-14 17:23:14.635 12684-12684/com.mapbox.mapboxsdk.testapp D/AndroidRuntime: Shutting down VM
03-14 17:23:14.636 12684-12684/com.mapbox.mapboxsdk.testapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.mapboxsdk.testapp, PID: 12684
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mapbox.mapboxsdk.testapp/com.mapbox.mapboxsdk.testapp.MainActivity}: android.view.InflateException: Binary XML file line #32: Binary XML file line #32: Error inflating class com.mapbox.mapboxsdk.maps.MapView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #32: Binary XML file line #32: Error inflating class com.mapbox.mapboxsdk.maps.MapView
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
at com.mapbox.mapboxsdk.testapp.MainActivity.onCreate(MainActivity.java:103)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.mapbox.mapboxsdk.maps.MapView
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
at com.mapbox.mapboxsdk.testapp.MainActivity.onCreate(MainActivity.java:103)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:619)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
at com.mapbox.mapboxsdk.testapp.MainActivity.onCreate(MainActivity.java:103)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mapbox.mapboxsdk.testapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libmapbox-gl.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at com.mapbox.mapboxsdk.maps.NativeMapView.<clinit>(NativeMapView.java:44)
at com.mapbox.mapboxsdk.maps.MapView.initialize(MapView.java:193)
at com.mapbox.mapboxsdk.maps.MapView.<init>(MapView.java:157)
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:619)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
at com.mapbox.mapboxsdk.testapp.MainActivity.onCreate(MainActivity.java:103)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) |
If the filter is changed to For reference: Computing Version code in multi-flavor setup. |
From the many things I've been trying, upgrading to Android NDK Revision 11c (March 2016) unfortunately won't fix this issue. It seems to me that the compiler is generating invalid code for the C++14 stuff we use on |
@Trinea @tmpsantos After re-reading this ticket, I'm still a bit confused by it's overall direction. Is the goal of this to be able to only ship the |
@KarenZZhang @xinnong Excellent! Thank you for clarifying the needs. This ticket makes much more sense now. 👍 I'll touch base with @tmpsantos on the work that he's started on this already and see what we can do. |
Just noting that I've talked with @tmpsantos and he's had some success getting this to work in his local development environment. More technical information will come from him as he's running point on this investigation. |
Thank you so much for your kind help! @bleege @tmpsantos @tobrun |
I talked with @tmpsantos over the weekend and he said that he's going to pick this up on Monday. |
Excellent! Thanks @bleege @tmpsantos |
Have a fix for this being tested/reviewed at #5254. I got an armeabi build working on a Nexus 5 (armv7) and Nexus 5x (armv8) with that branch. |
Backported patches fixing ARMv5 support for issue #3985.
This fix has also been cherrypicked on to the Great job @tmpsantos! |
@bleege How can I get the new build 4.1.0-SNAPSHOT? I can't find it in mavenCentral. Thanks! |
@wingwuyf We publish nightly SNAPSHOTS and according the Web site it looks like the latest one is Number 48 from this morning. Please note that SNAPSHOTS aren't on the main |
@bleege I've tried the 4.1.0-SNAPSHOT, it works fine without any trouble. Thank you so much! |
@wingwuyf Great to hear that everything is working for you! |
For smaller size, We add
in My app's build.gradle file, It means always compile armeabi folder, so use armeabi so if on armv7 devices, That's work for all tripartite library.
But when use mapbox, map is empty on armv7 devices if only use armeabi so like above.
I want to know why so lib of armeabi is not work on armv7 devices?
Thank you very much. @bleege
The text was updated successfully, but these errors were encountered: