0

I discovered an issue on my Native app,

I realized that : when I click on my Home button Android next, I open any other Android app, after I go back in my app, it seems to be back in an infinite loop (black screen).

However, if I click Home button Android and right after, I return immediately on my apps, everything is going well.

Nothing is happening in logs for my app,

I put logs in all methods of lifecycle for my MainActivity and my Fragment, but any method is called...

I desactivated these modules : Firebase and Fabric.io (Crashlytics) but it changes nothing...

From where this bug comes ? I have no idea yet, for information I updated Android Studio 1.5 to 2.1.2, the gradle, buildToolsVerions...

Maybe the garbage collector is concerned ?

I use....

Android Studio 2.1.2

compileSdkVersion 23

buildToolsVersion '23.0.3'

The Gradle Version

gradleVersion = '2.12'
MLProgrammer-CiM
  • 17,231
  • 5
  • 42
  • 75
NonowPoney
  • 982
  • 4
  • 14
  • 30
  • It might be caused by Firebase and the way you're importing Google Services in your project or any of your libraries. TAke a look in [this](http://stackoverflow.com/questions/37791253/how-to-spot-app-freeze-causes-when-app-is-returning-from-pause-state/37795818#37795818) question – E. Fernandes Jun 23 '16 at 09:30
  • Thanks for your help I'll look this ! – NonowPoney Jun 23 '16 at 09:37

1 Answers1

1

I resolved my issue,

It's due to Google Services :

I deleted this line : compile 'com.google.android.gms:play-services:9.0.2

Next, I replaced by this :

compile 'com.google.android.gms:play-services-gcm:9.0.2'
compile 'com.google.android.gms:play-services-location:9.0.2'

(You must only use the libraries you need)

Check that for more informations : https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project

NonowPoney
  • 982
  • 4
  • 14
  • 30