Stephen McCormick
Stephen McCormick

Reputation: 1796

android:targetSdkVersion="23" Crashes so Galaxy S6

Simply changing from android:targetSdkVersion="22" to "23" causes my app to crash on the Galaxy S6. What would cause that? Rolling back and everything is fine.

I don't have an S6 so I cannot replicate - I'm sure it is something simple...

Upvotes: 2

Views: 385

Answers (1)

Sound Conception
Sound Conception

Reputation: 5421

The most likely cause is the permissions required by your app, specified in your Manifest.

"Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app." See Requesting Permissions at Run Time

In particular if your app requires any of the permissions listed in the Dangerous permissions and permission groups table, you will need to implement code to ask for those permissions at runtime on devices running 23 or higher. If you don't, and you try to perform a task that requires one of these permissions, the app will crash.
Normal (Non-dangerous) permissions however, are automatically granted by the system if required, and do not need to be individually requested at run time.

If you want to avoid this issue, just leave your target SDK as 22. If there are other features of SDK 23 that you particularly need then you will need to go through the steps indicated in the first link above so that permissions are requested at run time on devices running 23 or higher.

Marshmallow (23) has been rolled out for the Galaxy S6 in many regions now. If you can find out what Android version the Galaxy S6 that is experiencing the crash is running, I bet you'll find it's Marshmallow.

Upvotes: 3

Related Questions