You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
I saw an open issue that was discussing something related to that -- in the discussion it seemed that Android should fallback to the 32bit lib if no 64bit was found, but clearly this is not happening in my case.
Thank you @leofarage for the report. Just to clarify, you're only seeing this message on 64bits devices, right?
I just tried a fresh build on a Nexus 6p which is a 64 bits device and I couldn't reproduce the issue (see screenshot below). Could you tell us the steps you follow to reproduce this crash? That'd help us troubleshoot the root cause of it. Also, are you seeing this crash with every run, or just during the first time you try to launch the app?
As some background, we regularly develop and test using 64 bit Android devices specifically the Samsung S6 and HTC M9. That's not to say there isn't an issue but I just wanted to let you know that we regularly run it on 64 bit devices (in addition to 32 bit devices).
My project has a few other libraries that are being used -- possibly forcing the use of 64 bits .so?
I tested on the Samsung Galaxy S6 and S6 Edge and both crashed. I'm attaching in the end of the comment the libraries used in the project.
Both devices crashes on entering the project's MapActivity. The map Activity's layout is made of 2 fragments -- one fragment containing the MapView defined using xml and the other fragment has a recycler view using a Horizontal LinearLayoutManager. Both fragments are child of a RelativeLayout where the MapFragment takes the whole parent and the RecyclerViewFragment takes just 1/4 of the bottom part of the parent -- overlapping the map.
As I mentioned this repository's example app crashes the same way as my project does. I really don't know what I could be doing wrong.
Thanks for taking the time for trying to solve my issue.
As I mentioned this repository's example app crashes the same way as my project does. I really don't know what I could be doing wrong.
Ah... one thing to check is to make sure that a germane ABI .so is being generated for the device / emulator that it'll run on. They'll show up in the jniLibs directory of MapboxGLAndroidSDK (see screenshot).
Possible ABI In Project
ABI are created using the make command in the root of the whole project (not in /android). Here's how those work:
// Produces armabi-v7a
make android
// Produce specific ABI
make android-lib-***
// Specific ABI Example for x86
make android-lib-x86
// Produces all ABI
make apackage
My project has a few other libraries that are being used -- possibly forcing the use of 64 bits .so?
Very possible. If one of those libraries ships an arm64 ABI .so then the device will only look there for them, which is a known issue. That said, looking at your dependencies list I didn't see one. We use many of the same libraries internally too and haven't seen issues with them.
Hi, I realized that the accessToken was missing from the Manifest file -- that solved the issue mentioned above.
I guess this issue is resolved. The best solution would be the lib packing a 64bits .so but since this is not planned for the near future I'll have to decided what to do about the Card.IO lib.
I am getting the exact same libmapbox-gl.so error as soon as I add compile 'io.realm:realm-android:0.85.0' to my dependencies and jcenter() to the repositories. (HTC One M9, tested in MapBoxAndroidDemo)
This doesn't mean that we are against shipping a 64 bit .so as other libraries can and do, but simply that this is the current state. If you're interesting in adding 64 bit .so support, the first step will be to add it to the Makefile and run make android-lib-arm64 from the Command Line. We ❤️ Pull Requests so please feel free to submit a working arm64 PR.
I re ran last night's arm64 test this morning for the arm7 ABI using the stock make android command. Everything worked as expected on the Nexus 5x. Based on these results I'm confident that @tmpsantos solution will work as needed for the arm ABIs.
The remaining thing to do is to verify that the remaining ABIs (x86, x86-64, mips) work as expected also. To do this @tobrun has produced sample TestApp .apk that include all ABIs (via make apackage) and is working with @zugaldia to upload them to AWS Device Farm for testing across the different ABIs. This should take a few hours, so by the end of the day we should be officially good to go.
Excellent @tobrun@zugaldia ! I'll merge update the Makefile to add arm64 build to it and then merge it into the release branch so it makes it to 4.0.0-final.
It looks like @tmpsantos merged this into master already which didn't show up until after I refreshed this page on GitHub. D'oh! Based on how GitHub automatically closed this issue via 51a3907 it looks like that's the only commit I'll need to cherry pick to the release-ios-3.2.0-android-4.0.0 branch to get the arm64 support added. I'll also cherry pick 08f92ff19989552149fd4c1a369ce999da57afe5 as it formally adds arm64 to the Android Library .aar build process.
As usual @tmpsantos is one step of ahead of me and has added the arm64 inclusion in PR #4366. So the new plan is to merge that PR into master. Once that's done, I'll cherry pick both files over to the release branch and then close this ticket.
I just cherry picked the two commits as discussed with @tmpsantos from master to release-ios-3.2.0-android-4.0.0. I'm going to fire off a new SNAPSHOT from release-ios-3.2.0-android-4.0.0 so that we can make this available ASAP.
Big thanks to @tmpsantos for solving this problem! 💥
Activity
zugaldia commentedon Dec 1, 2015
Thank you @leofarage for the report. Just to clarify, you're only seeing this message on 64bits devices, right?
I just tried a fresh build on a Nexus 6p which is a 64 bits device and I couldn't reproduce the issue (see screenshot below). Could you tell us the steps you follow to reproduce this crash? That'd help us troubleshoot the root cause of it. Also, are you seeing this crash with every run, or just during the first time you try to launch the app?
zugaldia commentedon Dec 1, 2015
/cc: @bleege @tobrun
bleege commentedon Dec 2, 2015
@leofarage Yep, the Mapbox Android SDK don't ship an
arm64.so as part of the Android Library based on information from Google. Could you tell us more about how your project is setup? Are there other native code bases / dependencies as part of it?As some background, we regularly develop and test using 64 bit Android devices specifically the Samsung S6 and HTC M9. That's not to say there isn't an issue but I just wanted to let you know that we regularly run it on 64 bit devices (in addition to 32 bit devices).
leofarage commentedon Dec 2, 2015
My project has a few other libraries that are being used -- possibly forcing the use of 64 bits .so?
I tested on the Samsung Galaxy S6 and S6 Edge and both crashed. I'm attaching in the end of the comment the libraries used in the project.
Both devices crashes on entering the project's MapActivity. The map Activity's layout is made of 2 fragments -- one fragment containing the MapView defined using xml and the other fragment has a recycler view using a Horizontal LinearLayoutManager. Both fragments are child of a RelativeLayout where the MapFragment takes the whole parent and the RecyclerViewFragment takes just 1/4 of the bottom part of the parent -- overlapping the map.
As I mentioned this repository's example app crashes the same way as my project does. I really don't know what I could be doing wrong.
Thanks for taking the time for trying to solve my issue.
Here are the libraries used in the project:
bleege commentedon Dec 2, 2015
Ah... one thing to check is to make sure that a germane ABI .so is being generated for the device / emulator that it'll run on. They'll show up in the
jniLibsdirectory ofMapboxGLAndroidSDK(see screenshot).Possible ABI In Project
ABI are created using the
makecommand in the root of the whole project (not in/android). Here's how those work:Very possible. If one of those libraries ships an
arm64ABI .so then the device will only look there for them, which is a known issue. That said, looking at your dependencies list I didn't see one. We use many of the same libraries internally too and haven't seen issues with them.leofarage commentedon Dec 9, 2015
Hi, sorry for taking so long to answer -- I was out of the office.
Anyhow, I found out that the Card.IO library packs the 64 bits libs, consequently it creates a arm64-v8a folder inside the libs folder of the app.
After removing it from the app the UnsatisfiedLinkError disappeared, instead a new error appeared:
This test was done using a Samsung Galaxy S6 Edge running Android 5.0.2 and a Samsung Galaxy S3 running Android 4.3
Thanks for all the help!
leofarage commentedon Dec 9, 2015
Hi, I realized that the accessToken was missing from the Manifest file -- that solved the issue mentioned above.
I guess this issue is resolved. The best solution would be the lib packing a 64bits .so but since this is not planned for the near future I'll have to decided what to do about the Card.IO lib.
Thank you for all the help!
leofarage commentedon Dec 9, 2015
So, I found out that gradle supports targeting platforms. I found it in this SO question.
Using that I forced my project to not attach the 64 bits .so. I guess this is a good solution while Mapbox doesn't support 64 bits.
mmuelder commentedon Dec 11, 2015
I am getting the exact same libmapbox-gl.so error as soon as I add
compile 'io.realm:realm-android:0.85.0'to my dependencies and jcenter() to the repositories. (HTC One M9, tested in MapBoxAndroidDemo)bleege commentedon Dec 14, 2015
Thanks for all the insight into
arm64question (and the Gradle filtering option on StackOverflow). For some context / history we looked into this issue in September 2015 and discovered that Google is still only recommending 32 bit.sofiles.This doesn't mean that we are against shipping a 64 bit
.soas other libraries can and do, but simply that this is the current state. If you're interesting in adding 64 bit.sosupport, the first step will be to add it to theMakefileand runmake android-lib-arm64from the Command Line. We ❤️ Pull Requests so please feel free to submit a workingarm64PR.28 remaining items
bleege commentedon Mar 16, 2016
I just successfully tested the
arm-64ABI by doing the following on my Nexus 5x, which runs at 64 bit processor.3128-arch64_androidmake cleanmake android-lib-arm-v8 -j8This confirms to me that the
arm-64ABI works in isolation as expected. 🎆The next thing to do is confirm that the other supported ABI continue to work by running it through AWS Device Farm.

_arm-64 ABI in local SDK_
_arm-64 ABI in local TestApp_bleege commentedon Mar 17, 2016
I re ran last night's arm64 test this morning for the
arm7ABI using the stockmake androidcommand. Everything worked as expected on the Nexus 5x. Based on these results I'm confident that @tmpsantos solution will work as needed for the arm ABIs.The remaining thing to do is to verify that the remaining ABIs (x86, x86-64, mips) work as expected also. To do this @tobrun has produced sample TestApp
.apkthat include all ABIs (viamake apackage) and is working with @zugaldia to upload them to AWS Device Farm for testing across the different ABIs. This should take a few hours, so by the end of the day we should be officially good to go.The only remaining thing to do once we get sign off is to add
android-lib-arm-v8back into themake apackagebuild stack via the Makefile.
_arm 32 bit ABI in local SDK_
_arm 32 bit ABI in local TestApp_tobrun commentedon Mar 17, 2016
The results are in, we are now supporting the same amount as before thus the introduction of the 64 bit was succesfull!
bleege commentedon Mar 17, 2016
Excellent @tobrun @zugaldia ! I'll merge update the Makefile to add arm64 build to it and then merge it into the release branch so it makes it to 4.0.0-final.
Bump mason
bleege commentedon Mar 17, 2016
It looks like @tmpsantos merged this into
masteralready which didn't show up until after I refreshed this page on GitHub. D'oh! Based on how GitHub automatically closed this issue via 51a3907 it looks like that's the only commit I'll need to cherry pick to therelease-ios-3.2.0-android-4.0.0branch to get the arm64 support added. I'll also cherry pick 08f92ff19989552149fd4c1a369ce999da57afe5 as it formally adds arm64 to the Android Library .aar build process.bleege commentedon Mar 17, 2016
As usual @tmpsantos is one step of ahead of me and has added the arm64 inclusion in PR #4366. So the new plan is to merge that PR into
master. Once that's done, I'll cherry pick both files over to the release branch and then close this ticket.Bump mason
bleege commentedon Mar 17, 2016
I just cherry picked the two commits as discussed with @tmpsantos from
mastertorelease-ios-3.2.0-android-4.0.0. I'm going to fire off a new SNAPSHOT fromrelease-ios-3.2.0-android-4.0.0so that we can make this available ASAP.Big thanks to @tmpsantos for solving this problem! 💥

_arm64 Fix Commits Cherry Picked Onto Release Branch_leofarage commentedon Mar 22, 2016
Awesome! Congratulations!