I used the GDAL Library in my application and it has been working properly. The Google play service announced that they upload only 64-bit compliant APK after 1st Aug 2019. So I rendered the project to 64 bit compliant. Unfortunately, there has some issue happened in GDAL library. they showing that no implementation for the gdal library(ie the .so file according to the ABI type). So I think the corresponding GDAL 64 bit were unavailable for this scope. I have the .so file in armeabi folder which is 32 bit compliant. Then I switched to arm64-V8a compliant. After that I generate the build, the corresponding .so file is not there in arm64-v8a folder. So my question is, How we can generate the 64 bit .so files from GDAL Library? Note: Normally I used 32 bit compliant APK and it has been running properly. According to the new requirement of Playstore I used 64-bit compliant APK and done a smoke testing,unfortunately they get crashed, the issue of this crash is that, I used a GDAL library,which has a .so files with respect to ABI type. so when I run in 64 bit, the error showing that no implementation found for GDAL. Hence I used the apk analyzer to look the difference from 32 bit compliant. so I identified that there is no .so file related to arm64-V8a folder. So I think we need to generate the 64 bit .so file for the GDAL Library. Is there any solution to generate this I here by adding the screen shots, see the lib folder 32 bit compliant 64bit compliant 3`.so files inside armeabi
2 Answers
I'm having the same troubles migrating some ARM-Android libraries from 32 to 64 bits.
In the case of GDAL, fortunately I could find pre-built 64 bits binaries:
https://github.com/eltorio/RtkGps/tree/master/gdal-prebuilt
GDAL java bindings can be found in the libs
folder. That is the gdal.jar
file:
-
Thank you for the steps @lusitanica. can we generate the .so file by using this source code? I want 5 types of .so files from gdal library. 1. libgdalconstjni.so 2. libgdaljni.so 3. libogrjni.so 4. libosrjni.so 5. libproj.so Commented Jun 4, 2019 at 11:59
-
Sure, just take a look at the
gdal.mk
file. Don't forget your mentionedjni
files are all bundled in oneso
file in the link I've pointed. github.com/eltorio/RtkGps/blob/master/jni/gdal.mk Commented Jun 4, 2019 at 12:09 -
unable to build the Application in android studio.It is showing that arm64 abi type is not supported for platform. Do you have any idea about this. Following issue raised while taking build: "ABIs [arm64-v8a, x86_64] are not supported for platform. Supported ABIs are [armeabi-v7a, x86]." Commented Jun 4, 2019 at 12:33
-
I had no trouble rebuilding
gdal.so
but then I'm usingndk-build
script instead of Studio. Try to tweak withAndroid.mk
, and don't forget the scripts are targeting Android 21 API, github.com/eltorio/RtkGps/blob/master/jni/Android.mk Commented Jun 4, 2019 at 12:40 -
1Yes, I got It :) Thank you for your Support @lusitanica Commented Jun 10, 2019 at 5:13
How we can generate the 64 bit .so files from GDAL Library?
You have to build the library from its original source code using Android NDK.
See:
-
Thank you for the reply @shizhen. I tried the mentioned way, but unfortunately doesn't generate the so file. The steps that I did using the command line, so I got error.:-( Commented Jun 4, 2019 at 11:54