10

I know about this question but I don't think it helps me and the problem looks slightly different.

I'm doing this app where I need to implement AppsFlyer for tracking and I'm required to use only 2 components from Google Play Services:

com.google.android.gms:play-services-ads

com.google.android.gms:play-services-gcm

And I'm using the latest version of the Google Play Services, 9.0.2 that is.

The problem is that on the first app launch after installing the app, the app takes quite a bit of time to start. There's no log output and when the app starts doing something, the first line on the log is:

06-16 16:50:23.782 22368-22368/com.company.app I/FirebaseInitProvider: FirebaseApp initialization unsuccessful

I'm not using Firebase, how can I get rid of this? It really slows down the application initialization. Not a very good user experience...

EDIT:

I've added both libs, one at a time and I've realized that the GCM is the one causing the issue. When I add:

com.google.android.gms:play-services-gcm

I start getting the "FirebaseApp initialization unsuccessful" log and the app takes a while to start. Perhaps downgrading "fixes" the problem, but that's not a very good solution.

4
  • Can you provide some code snippet? Also check if you have any firebase dependencies in your app. Commented Jun 17, 2016 at 7:52
  • @abielita There's no code... I just include those 2 dependencies on the app's build.gradle file. And I don't have any Firebase dependencies. This problem started with the inclusion of those Play Services dependencies. Commented Jun 17, 2016 at 10:47
  • AppsFlyer are not using Firebase. Do you have FirebaseInitProvider on your manifest? Commented Jun 20, 2016 at 6:29
  • @gmeroz No, I don't. Commented Jun 20, 2016 at 8:31

2 Answers 2

14

I would suggest you to exclude the firebase group using gradle:

compile('com.google.android.gms:play-services-ads:9.0.2') { exclude group: 'com.google.firebase', module: 'firebase-common' } compile('com.google.android.gms:play-services-gcm:9.0.2') { exclude group: 'com.google.firebase', module: 'firebase-common' } 

Or, simply apply a global exclude configuration, like this:

configurations { all*.exclude group: 'com.google.firebase', module: 'firebase-common' } 

Hope it helps :)

Sign up to request clarification or add additional context in comments.

1 Comment

After some testing, this fixes the problem for me. The " FirebaseApp initialization unsuccessful" log message never occurs and there's no slow startup. Thanks :)
1

I had the same issue and not only I had to downgrade the services but also gradle version.

In my case I had (in app/build.gradle)

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

and (in build.gradle)

classpath 'com.android.tools.build:gradle:2.1.2' 

After changing services back to 8.4.0 and gradle to 1.5.0 (Probably higher version is fine also but it was the one I had before upgrading to 2.1.2) everything is fine and FirebaseApp initialization is gone.

Maybe it's not the best solution but I couldn't find anything else.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.