arcgis-runtime-samples-android icon indicating copy to clipboard operation
arcgis-runtime-samples-android copied to clipboard

Samples are not compatible with x86 architecture phone

Open salihyalcin opened this issue 6 years ago • 44 comments

Feature or Bug?

Hi, I want to run samples on my phone Asus Zenfone 5 (T00J) samples didn't start and crashing.

Behavior

When I want to run app, it always keeping stop and LogCat gives this error.

java.lang.RuntimeException: 
  at android.opengl.GLSurfaceView$EglHelper.throwEglException (GLSurfaceView.java:1201)
  at android.opengl.GLSurfaceView$EglHelper.throwEglException (GLSurfaceView.java:1192)
  at android.opengl.GLSurfaceView$EglHelper.start (GLSurfaceView.java:1042)
  at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1409)
  at android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1248)

Informations

  1. Android Studio v3.0.1
  2. Esri Android SDK v100.2.1
  3. Asus ZenFone 5 (ASUS_T00J), 1024MB RAM, Android 5.0

salihyalcin avatar Mar 16 '18 12:03 salihyalcin

Same here.

TooLazyy avatar Aug 24 '18 10:08 TooLazyy

Have you guys tried with 100.3 by chance?

eric906 avatar Aug 24 '18 17:08 eric906

@eric906 100.3 version has minSdkVersion is upped to 19, i'm using 16 in my project for now.

TooLazyy avatar Aug 28 '18 09:08 TooLazyy

@TooLazyy - this is most likely a bug but it's unlikely we would release a patch for 100.2.1. If you are able to upgrade to minSdkVersion 19 you could check if the bug is fixed at 100.3.

gunt0001 avatar Aug 31 '18 12:08 gunt0001

Same here :(

Asus K019 
Android 5.0.1 
Esri Sample version: 100.4

And

Samsung tab2 7inch
Android 4.0
Esri Sample Version: 100.4

@gunt0001 @TADraeseke how can use esri library for x86 architecture ?

javadghane avatar Feb 19 '19 10:02 javadghane

@javadghane - the ArcGIS Android SDK 100.4.0 and upwards only supports devices running Android 4.4 (API 19) or higher. See our system requirements: https://developers.arcgis.com/android/latest/guide/system-requirements.htm

So the Samsung tab 2 7inch is not supported.

We are investigating the issue for Asus K019 and Asus Zenfone 5.

gunt0001 avatar Feb 19 '19 11:02 gunt0001

@gunt0001 - can i use old version of SDK for x86 architecture devices? if answer is yes, what version is ok?

javadghane avatar Feb 25 '19 04:02 javadghane

Hi guys ? Any news about this issue ? We tried new SDK and still not compatible with x86 devices. Old version of this SDK (v10.2...) also has this issue but they fix the problem. You can follow from here #48

We really need this update to work our app at x86 devices.

Thanks.

salihyalcin avatar Mar 21 '19 10:03 salihyalcin

@salihyalcin - we are still investigating this issue.

gunt0001 avatar Mar 21 '19 14:03 gunt0001

Test with

Asus K019 
Android 5.0.1 
Esri Sample version: 100.5

still same problem:

 D/OpenGLRenderer: Render dirty regions requested: true
 D/Atlas: Validating map...
 I/OpenGLRenderer: Initialized EGL, version 1.4
 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
 D/OpenGLRenderer: Enabling debug mode 0
 E/AndroidRuntime: FATAL EXCEPTION: GLThread 723
    Process: xxxxxxxxx, PID: 5053
    java.lang.RuntimeException: createContext failed: EGL_SUCCESS
        at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1192)
        at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1183)
        at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1033)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1406)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1242)

javadghane avatar May 09 '19 05:05 javadghane

Hi there is the problem solved for x86 devices on 100.6 version?

@gunt0001

javadghane avatar Dec 01 '19 07:12 javadghane

Hi, problem is not solved yet. We are using this SDK in our production and users are with x86 phones giving one star in Google play.

In older sdk we got this issue too and @doneill solve it. You can see his explanation on geonet

https://community.esri.com/thread/159907

salihyalcin avatar Dec 11 '19 12:12 salihyalcin

The current situation with x86 support is that we supply the 32bit library for use with emulators which will of course need this architecture to run on PC, mac or linux.

We currently don't build x86 for 64bit which I realise means you cannot deploy to the Google Play store for this architecture.

In the world of Android the vast majority of devices are based on an ARM architecture which of course we support for both 64 and 32bit.

You can refer to this document which explains about building for specific architectures: https://developers.arcgis.com/android/latest/guide/reducing-your-apk-size.htm

I can see that the ASUS Zenfone 5 is based on an Intel Atom chip.

Looking at the Zenfone 6 I can see they have moved to a Snapdragon 855 chip which is ARM based.

In the market you are deploying to, what would you say is the percentage of Intel based Android devices you are coming across?

mbcoder avatar Dec 11 '19 14:12 mbcoder

Hi @mbcoder, Thanks for the guidance. in market where we working on that almost one of each five devices is based on x86 processor. like this devices: samsung tab 2 asus zenfone asus k019

javadghane avatar Dec 12 '19 12:12 javadghane

@javadghane this is good information, and the ratio you give is higher than I'd have guessed.

This will help me to prioritise support for x86-64 architectures... don't worry we are considering this.

mbcoder avatar Dec 12 '19 13:12 mbcoder

Hi @mbcoder I am using ArcGIS SDK in my application. Facing a 64-Bit compatibility issue while publishing the application on play store as according to Google Android documentation I have to update my applications according to 64 Bit architecture. Can you please suggest it is very regent for me?

I am using below code in Gradle file to handle Compatability:- ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

Thanks Puneet

puneetkumar1011 avatar Dec 18 '19 18:12 puneetkumar1011

@puneetkumar1011 take a look at the following page:

https://developers.arcgis.com/android/latest/guide/reducing-your-apk-size.htm

For deployment to the Play store, you can only deploy binaries for ARM based devices. ARM is what you will find in the majority of smartphones.

The x86 binary (not that we don't supply an x86-64) is essentially there to allow you to work with an emulator running on your Intel based development machine.

We are actively looking at adding the native binaries for x86-64 into our product.

mbcoder avatar Dec 19 '19 14:12 mbcoder

@puneetkumar1011 can you tell me what devices you are using which have the x86-64 chips in?

mbcoder avatar Dec 19 '19 14:12 mbcoder

@mbcoder

I am using this version of ArcGIS SDK in my application:- implementation 'com.esri.arcgis.android:arcgis-android:10.2.9'

and in Gradle file, we have added these filters as above suggested by you:-

ndk.abiFilters 'armeabi-v7a', 'arm64-v8a'

but after that, we are still facing problem while uploading the application on PlayStore playstore_error_ArcGIS Can you please suggest how we can handle it?

Thanks for your early reply

puneetkumar1011 avatar Dec 19 '19 19:12 puneetkumar1011

@mbcoder On Devices list below:-

  1. Google Pixel
  2. Samsung S8+
  3. Samsung S7
  4. Huawei

We are facing a crash at the starting of the application.There are very few devices like Moto G5 plus on which working fine.Sharing crash logs:-

java.lang.UnsatisfiedLinkError: No implementation found for boolean com.esri.core.runtime.LicenseImpl.nativeIsClientIdValid(java.lang.String) (tried Java_com_esri_core_runtime_LicenseImpl_nativeIsClientIdValid and Java_com_esri_core_runtime_LicenseImpl_nativeIsClientIdValid__Ljava_lang_String_2) at com.esri.core.runtime.LicenseImpl.nativeIsClientIdValid(Native Method) at com.esri.core.runtime.LicenseImpl.b(SourceFile:103) at com.esri.android.runtime.ArcGISRuntime$License.b(SourceFile:133) at com.esri.android.runtime.ArcGISRuntime$License.a(SourceFile:72) at com.esri.android.runtime.ArcGISRuntime.setClientId(SourceFile:51) at com.sba.sba.application.SBAApplication.onCreate(SBAApplication.java:52) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1189) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460) at android.app.ActivityThread.access$1300(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

puneetkumar1011 avatar Dec 19 '19 19:12 puneetkumar1011

@puneetkumar1011 I can see the problem.

The good news is that your targeted devices have ARM chipsets in them, if you use the latest version of the ArcGIS Runtime then you will be fine using these devices. 100.7.0 is our current release.

I can see however that you are using 10.2.9 which is quite an old version of our SDK. We only supplied a 32bit binary of this release. This will of course work fine on a 64bit device, but recently Google Play stopped allowing this kind of deployment (you need to supply 32 and 64bit for new apps).

Your solution here is that you are going to have to migrate to the new version of the SDK. The SDK is a little different in many places as we modernised the API.

mbcoder avatar Dec 20 '19 13:12 mbcoder

@mbcoder

Hi,

on devices in which our application is getting crashed, we got these crash logs:-

Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sba.sba-SiFC5mQA1Tm0uoIHcifxcA==/base.apk"],nativeLibraryDirectories=[/data/app/com.sba.sba-SiFC5mQA1Tm0uoIHcifxcA==/lib/arm64, /data/app/com.sba.sba-SiFC5mQA1Tm0uoIHcifxcA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libruntimecore_java.so" 2019-12-20 19:30:07.628 17282-17282/com.sba.sba W/System.err: at java.lang.Runtime.loadLibrary0(Runtime.java:1011)

Please suggest us to handle this problem of missing .so file. It comes after adding ArcGIS SDK.

Thanks

puneetkumar1011 avatar Dec 20 '19 14:12 puneetkumar1011

@mbcoder Hi, I have started to update the project code a day ago according to the latest version of ArcGIS SDK 100.7.0. It is time taking because the implementation of the earlier version is done by some other developer. Our client has a very urgent delivery and even he is also a paid customer of your Service. Our all functionality is completed but we stuck just due to this older version of SDK used in the code. Is there any quick fix for the crash logs I have shared above.

Once our current delivery is released parallelly we will update our SDK in the project for the future. we have tried to call on your customer service but not able to contact you guys. I am very thankful for your kind support. Thanks

puneetkumar1011 avatar Dec 20 '19 14:12 puneetkumar1011

We're facing same problem for a long time. When will you solve we're looking forward to your answer. @doneill @mbcoder

teomanyaman avatar Dec 23 '19 08:12 teomanyaman

@mbcoder Hi, I am working with the latest version of SDK 100.7.0. I am able to show the map and load data from the URL.
I have one functionality to implement Search View on top of the map so that users can make Search over the map for particular data. But I am facing this error while getting details using Query:-

java.util.concurrent.ExecutionException: com.esri.arcgisruntime.io.JsonEmbeddedException: Unable to complete operation.

/** * Queries the sublayer's feature table with the query parameters and displays the result features as graphics * @param sublayer - type of sublayer to query from * @param sublayerSymbol - symbol to display on map * @param query - filters based on the population and the current view point * @param graphicsOverlay - manages the graphics that will be added to the map view */ private static void QueryAndDisplayGraphics(ArcGISMapImageSublayer sublayer, Symbol sublayerSymbol, QueryParameters query, GraphicsOverlay graphicsOverlay) { if (sublayer.getLoadStatus() == LoadStatus.LOADED) { ServiceFeatureTable sublayerTable = sublayer.getTable(); ListenableFuture<FeatureQueryResult> sublayerQuery = sublayerTable.queryFeaturesAsync(query); sublayerQuery.addDoneListener(() -> { try { FeatureQueryResult result = sublayerQuery.get(); for (Feature feature : result) { Graphic sublayerGraphic = new Graphic(feature.getGeometry(), sublayerSymbol); graphicsOverlay.getGraphics().add(sublayerGraphic); } } catch (InterruptedException | ExecutionException e) { Log.e(MainActivity.class.getSimpleName(), e.toString()); } }); } }

puneetkumar1011 avatar Dec 27 '19 14:12 puneetkumar1011

@puneetkumar1011 for specific issues which are not related to the sample code for the SDK, you need to post your queries to GeoNet https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-android

mbcoder avatar Jan 02 '20 12:01 mbcoder

Hi @mbcoder

I have updated my app with latest version 100.7.0. In release i used these two filters only :-
ndk { abiFilters "armeabi-v7a", "arm64-v8a" }

After this still i am getting problems if we download the app from Playstore we found this error:-

app_crash_screenshot

puneetkumar1011 avatar Jan 13 '20 15:01 puneetkumar1011

@puneetkumar1011 - none of the info in this stack trace points to an issue with the ArcGIS Runtime. Can you provide some more info?

gunt0001 avatar Jan 13 '20 18:01 gunt0001

@gunt0001 Hi ,

This problem is occurred when i am enabling :-
minifyEnabled true If I set it as false then it is working fine in all devices without any issue in Release from app store. So, i think there is some set of proguard rules for ArcGIS that we have to define in our application. Please provide those if you have written for Release.

Thanks for your support and guidence.

puneetkumar1011 avatar Jan 14 '20 13:01 puneetkumar1011

@puneetkumar1011 - thanks, that helps. We had some other users reporting issues with obfuscation. The Android ArcGIS Runtime SDK is already obfuscated so should be excluded from any further obfuscation at the application level. For example if you use Proguard you should be able to exclude the ArcGIS Runtime SDK from obfuscation as follows:

-keep public class com.esri.arcgisruntime.* { *; }

However, this doesn't seem to work for some users. We are currently investigating this. We will post any solution once we know more.

gunt0001 avatar Jan 14 '20 13:01 gunt0001