title: Error while sign in to google play games services : looper.prepare() can't be called
body: <p>I am getting this error from my play developer console:-</p>
  
  <pre><code>java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
      at android.os.Handler.&lt;init&gt;(Handler.java:121)
      at android.app.Dialog.&lt;init&gt;(Dialog.java:101)
      at android.app.AlertDialog.&lt;init&gt;(AlertDialog.java:63)
      at android.app.AlertDialog.&lt;init&gt;(AlertDialog.java:59)
      at android.app.AlertDialog$Builder.create(AlertDialog.java:793)
      at com.google.android.gms.common.GoogleApiAvailability.zza(Unknown Source)
      at com.google.android.gms.common.GoogleApiAvailability.getErrorDialog(Unknown Source)
      at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source)
      at com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:953)
      at com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:920)
      at com.google.example.games.basegameutils.GameHelper.giveUp(GameHelper.java:898)
      at com.google.example.games.basegameutils.GameHelper.resolveConnectionResult(GameHelper.java:865)
      at com.google.example.games.basegameutils.GameHelper.beginUserInitiatedSignIn(GameHelper.java:662)
      at com.sdsmdg.cycle.AndroidLauncher.signIn(AndroidLauncher.java:90)
      at com.sdsmdg.cycle.screens.SplashScreen.&lt;init&gt;(SplashScreen.java:41)
      at com.sdsmdg.cycle.CGame.create(CGame.java:23)
      at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:275)
      at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1381)
      at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1138)
  </code></pre>
  
  <p>It looks like it crashes when the user is unable to sign in to google play services, but I am unable to figure out the solution to this problem.</p>
  
  <p>Here is the source code for the game:-
  <a href="https://github.com/harshit211997/Hitball" rel="nofollow noreferrer">https://github.com/harshit211997/Hitball</a></p>