Select to view content in your preferred language

How to Fix: android/arcgis unfortunately <app> has stopped

2903
4
07-05-2016 12:48 PM
ScottBing
Emerging Contributor

Hi, I am a newbie to combining ArcGIS with Android. I am attempting to execute one of the ArcGIS example mapping programs. It is a simple Map Display program. It executes successfully using a Nexus6 emulator On Android 6.0.1 (Marshmallow) using Android Studio 2.1.2. When I port it to the actual device, a SAMSUNG-SM-G920V Galaxy s6, it fails immediately with the message: “Unfortunately <app> has stopped. This happens immediately when I press its icon on the phone. I have successfully executed other Android non-ArcGIS mapping applications on this same phone without any issues. These were all developed using Android Studio, not Eclipse.

I have registered the application with ESRI Developer Licensing and provided the ‘Client_ID” in my code.

I have spent hours combing through Google trying various suggestions without any success.

I wasn't sure how to format code on your forum, so I attached my application files to this discussion.

0 Kudos
4 Replies
AlexanderNohe1
Honored Contributor

In your MainActivity.java, it looks as though you are setting the client id twice.

Once on line 8 and then again on line 11.  Do you get any output when it crashes in LogCat?

Try removing line 8 entirely and just set the client id on line 11.

Additionally, would you try changing your target api version to that of 22 in your app build.gradle file?  This would avoid any gotchas with runtime permissions and possibly any errors that may exist with the newer Android versions.

One more interesting point:

If you uninstall the existing app on the emulator and redeploy to that emulator, does the issue persist?

0 Kudos
ScottBing
Emerging Contributor

I lowered the target API from 24 to 21 and the minimum API to 15.  This seems to be the magic combination.  The application executed successfully on a Samsung phone and an HP Touchpad.

0 Kudos
AlexanderNohe1
Honored Contributor

That is interesting.  What version of Android are the phone and touchpad running?

0 Kudos
ScottBing
Emerging Contributor

I recently upgraded the phone to Android 6.0.1 (Marshmallow).  It's been a while since i have upgraded the tablet.  It is still at KitKat.

0 Kudos