Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Samples are not compatible with x86 architecture phone #456

Open
salihyalcin opened this issue Mar 16, 2018 · 44 comments
Open

Samples are not compatible with x86 architecture phone #456

salihyalcin opened this issue Mar 16, 2018 · 44 comments

Comments

@salihyalcin
Copy link
Contributor

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
@TooLazyy
Copy link

Same here.

@eric906
Copy link

eric906 commented Aug 24, 2018

Have you guys tried with 100.3 by chance?

@TooLazyy
Copy link

TooLazyy commented Aug 28, 2018

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

@gunt0001
Copy link
Contributor

@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.

@javadghane
Copy link

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 ?

@gunt0001
Copy link
Contributor

@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.

@javadghane
Copy link

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

@salihyalcin
Copy link
Contributor Author

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.

@gunt0001
Copy link
Contributor

@salihyalcin - we are still investigating this issue.

@javadghane
Copy link

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
Copy link

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

@gunt0001

@salihyalcin
Copy link
Contributor Author

salihyalcin commented Dec 11, 2019

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

@mbcoder
Copy link
Member

mbcoder commented Dec 11, 2019

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?

@javadghane
Copy link

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

@mbcoder
Copy link
Member

mbcoder commented Dec 12, 2019

@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.

@puneetkumar1011
Copy link

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

@mbcoder
Copy link
Member

mbcoder commented Dec 19, 2019

@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
Copy link
Member

mbcoder commented Dec 19, 2019

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

@puneetkumar1011
Copy link

@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
Copy link

@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)

@mbcoder
Copy link
Member

mbcoder commented Dec 20, 2019

@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.

@puneetkumar1011
Copy link

@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
Copy link

@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

@teomanyaman
Copy link

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

@puneetkumar1011
Copy link

@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 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());
}
});
}
}

@mbcoder
Copy link
Member

mbcoder commented Jan 2, 2020

@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

@puneetkumar1011
Copy link

puneetkumar1011 commented Jan 13, 2020

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

@gunt0001
Copy link
Contributor

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

@puneetkumar1011
Copy link

@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.

@gunt0001
Copy link
Contributor

@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.

@puneetkumar1011
Copy link

@gunt0001

Ok, I will sure try this solution.
Thankyou

@puneetkumar1011
Copy link

@gunt0001
Hi,

We are facing this crash/problem on some devices having our live application from Play Store:-

Fatal Exception: java.lang.RuntimeException: createContext failed: EGL_SUCCESS
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1232)
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1223)
at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1073)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1440)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1280)

This exception occurs on just opening of the ArcGIS Map Screen.
Can you please check and suggest how to handle or fix this?

Thank you for help and suggestions.

@gunt0001
Copy link
Contributor

@puneetkumar1011 - this RuntimeException seems to occur on a small proportion of Android devices. There is no workaround for this at your level. We are currently investigating the issue and trying to come up with a fix.

@javadghane
Copy link

Hi again, today i just test 100.7 and 100.6 version on this device: Lenovo IdeaTab A3000

OS | Android 4.1 (Jelly Bean), upgradable to 4.2 (Jelly Bean)
Chipset | Mediatek MT8125 (28 nm)
CPU | Quad-core 1.2 GHz Cortex-A7
GPU | PowerVR SGX544

the same error of Intel device happens:

 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)

can you tell this problem is fix on next version(100.8) or with a hot fix?
thanks.

@mbcoder
Copy link
Member

mbcoder commented Feb 11, 2020

@javadghane I can confirm that we are in the process of investigating this error.

@and01
Copy link

and01 commented Feb 12, 2020

Same error:

    java.lang.RuntimeException: createContext failed: EGL_SUCCESS
        at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1223)
        at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1214)
        at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1064)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1431)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1271)

Can you provide us with a timeline for x86_64 support? We do have a not so small number of customers who want to run our app on their new devices. For a company like ESRI it is not professional at all to ignore this.

Problem Device list:

  • Xperia M5
  • Xperia L3
  • Desire 12
  • Rug Gear 650
  • Rug Gear 655
  • Oukitel c15 Pro

@mbcoder
Copy link
Member

mbcoder commented Feb 12, 2020

@and01 the issue here is nothing to do with X86-64 support; all the devices you list above have ARM based processors which we already support for 32 and 64bit.

The issue we are experiencing here is around some devices which use the PowerVR GE series GPU. When we are creating the OpenGL context we start by asking the GPU for its capabilities. Based on this response we create an OpenGL context, but the issue is the GPU has over stated its capabilities which is causing the crash you are seeing.

I can confirm that we are actively working on this issue so we can support these devices.

We are also working to include x86-64 libraries in the SDK, but as I said this isn't what is causing the issue you are experiencing.

@javadghane
Copy link

Hi @mbcoder @gunt0001
can you tell the problem with "PowerVR Gx series" is fixed?
is there are HotFixs for 100.7 or need to wait for 100.8?
is possible to contribute for solving this problem?

@gunt0001
Copy link
Contributor

gunt0001 commented Apr 6, 2020

@javadghane - we have made some substantial changes to OpenGL intialization of MapView/SceneView and we think these changes should also address createContext failed exception on PowerVR devices. We are currently trying to confirm this through additional testing. Those changes will be delivered with the upcoming 100.8.0 release which is close to be shipped.

@javadghane
Copy link

@gunt0001 thanks alot. if you need some "Power VR" devices for test, we are here :). glad to helping you for solving this problem. once again i must to say thanks for great support.

@gunt0001
Copy link
Contributor

gunt0001 commented Apr 6, 2020

@javadghane

if you need some "Power VR" devices for test, we are here

Thanks, that's much appreciated. If you could test against those devices as soon as we have released 100.8.0 that would be helpful. Let us know if you still see issues.

@puneetkumar1011
Copy link

Hi @gunt0001 @mbcoder

We are facing this crash on N number of devices:-
Fatal Exception: java.lang.RuntimeException: createContext failed: EGL_SUCCESS
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1232)
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1223)
at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1073)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1440)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1280)

I am using the latest ArcGIS SDK version 100.7.0. According to the above discussion in 100.8.0, this could be fixed . Can you please tell me an estimated time of Release 100.8.0 so that I can update to my Client.

Thank you for your kind support and guidance.

@ikbalyasar
Copy link

ikbalyasar commented Jun 24, 2020

Hi,
GM8 Go - LG K40S - casper-via-g4
I'm getting the same problem.

Please: ESRI Android Team: This problem is a very important problem. On some devices, it breaks while starting the app.
Please are you interested in this issue?
We want it to be solved at least 100.9.0
Best Regards, @doneill

@mbcoder
Copy link
Member

mbcoder commented Jun 24, 2020

The issue is related to the configuration of some devices with PowerVR GPUs. We are aware of the issue and actively working on a solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants