question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for Android Target SDK API 23 (currently Google Sign In crashes)

See original GitHub issue

If you target API 23+ the app must prompt the user for GetAccounts permission:

https://blog.xamarin.com/requesting-runtime-permissions-in-android-marshmallow/

We need to add a call to CheckSelfPermission.

Without that, I am finding that Authenticate() throws an exception, which I catch, but even so my app terminates with:

System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetResult (TResult result) [0x0000c] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/TaskCompletionSource.cs:322
  at Android.Gms.Extensions.GoogleApiClientExtensions+<BuildAndConnectAsync>c__AnonStorey0.<>m__0 (Android.OS.Bundle hint) [0x00000] in <1db671c6182d42a7b22c48ed6b33a584>:0
  at Android.Gms.Common.Apis.GoogleApiClientConnectionCallbacksImpl.OnConnected (Android.OS.Bundle bundle) [0x0000d] in <1db671c6182d42a7b22c48ed6b33a584>:0
  at Android.Gms.Common.Apis.GoogleApiClient+IConnectionCallbacksInvoker.n_OnConnected_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_connectionHint) [0x00011] in <1db671c6182d42a7b22c48ed6b33a584>:0
  at at (wrapper dynamic-method) System.Object:a6b03050-593a-4ddc-9bdf-441125fda0bf (intptr,intptr,intptr)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:25 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
Clanceycommented, May 27, 2017

like a noob, I forgot to push the update Try again

1reaction
Clanceycommented, May 19, 2017

Nugets are live! Along with updated readme, with steps on how to implement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why apps keep crashing when running on Emulator or ...
I want to develop an app in Android API 23 (Marshmallow) but i don't know why my app keep crashing when I run...
Read more >
Meet Google Play's target API level requirement
When you upload an APK, it must meet Google Play's target API level requirements. Starting on August 31, 2023: New apps must target...
Read more >
ReactNative app craches on Android 11 device with ...
ReactNative app crashes on Android 11 device with targetSdkVersion 30. React Native version: react-native info output: System: OS: macOS 10.15.7
Read more >
<uses-sdk> | Android Developers
Lets you express an application's compatibility with one or more versions of the Android platform, by means of an API level integer.
Read more >
Migrating from Android API level 30 to 31/32 or App ...
Step 1: In the File, android > build. gradle, change compiledSdkVersion, targetSdkVersion and ndkVersion. Step 2: In the File, android > app > ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found