Harsh Shah
Harsh Shah

Reputation: 2362

How to solve app launch - app is stuck on white screen

I check the error log, and it shows:

08-31 13:36:18.778 13207-13207/? I/art: Late-enabling -Xcheck:jni
08-31 13:36:18.877 13207-13207/com.knowyourmeds D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
08-31 13:36:18.888 13207-13207/com.knowyourmeds D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
08-31 13:36:18.902 13207-13207/com.knowyourmeds V/FA: Cancelling job. JobID: 380685678
08-31 13:36:18.904 13207-13207/com.knowyourmeds V/FA: Registered activity lifecycle callback
08-31 13:36:18.905 13207-13207/com.knowyourmeds I/FirebaseInitProvider: FirebaseApp initialization successful
08-31 13:36:18.937 13207-13224/com.knowyourmeds V/FA: Collection enabled
08-31 13:36:18.938 13207-13224/com.knowyourmeds V/FA: App package, google app id: com.knowyourmeds, 1:694023459332:android:ffd849037d9dc14b
08-31 13:36:18.939 13207-13224/com.knowyourmeds I/FA: App measurement is starting up, version: 11910
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app com.knowyourmeds
08-31 13:36:18.939 13207-13224/com.knowyourmeds D/FA: Debug-level message logging enabled
08-31 13:36:18.956 13207-13224/com.knowyourmeds V/FA: Connecting to remote service
08-31 13:36:18.980 13207-13207/com.knowyourmeds I/CrashlyticsCore: Initializing Crashlytics 2.6.1.23
08-31 13:36:18.999 13207-13224/com.knowyourmeds V/FA: Connection attempt already in progress
08-31 13:36:19.008 13207-13207/com.knowyourmeds I/CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful
08-31 13:36:19.018 13207-13207/com.knowyourmeds E/com.facebook.internal.AttributionIdentifiers: getAttributionIdentifiers should not be called from the main thread
08-31 13:36:19.025 13207-13243/com.knowyourmeds D/NetworkSecurityConfig: No Network Security Config specified, using platform default
08-31 13:36:48.923 13207-13223/com.knowyourmeds E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE

I also tried cleaning the project, restarting Android Studio and deleted the app from the device.

How should I resolve this issue?

Upvotes: 22

Views: 8680

Answers (6)

Abdul Basit Rishi
Abdul Basit Rishi

Reputation: 2425

I had same problem this library worked for me because this is facebook stable version.

compile 'com.facebook.android:facebook-android-sdk:4.35.0'

Upvotes: 1

Sahil Bhavsar
Sahil Bhavsar

Reputation: 188

Try below:
1. In your app level gradle, you must have used implementation "com.facebook.android:facebook-android-sdk:[4,5)"
2. Try to remove this or upgrade to the latest sdk

Upvotes: 9

Van Tran
Van Tran

Reputation: 41

Just revert the FacebookSDK back to 4.35.0. The version 4.36.0 causes the stuck in main thread.

E/com.facebook.internal.AttributionIdentifiers: getAttributionIdentifiers should not be called from the main thread

Upvotes: 4

dantes_21
dantes_21

Reputation: 427

It seems like some facebook SDK error. I got the same today and solved it by replacing dynamic version in the gradle file to the stable.

Replace this:

implementation "com.facebook.android:facebook-android-sdk:[4,5)"

to this:

implementation "com.facebook.android:facebook-android-sdk:4.35.0"

4.35.0 is the stable version of the SDK from facebook GitHub https://github.com/facebook/facebook-android-sdk

Upvotes: 19

Always Wei
Always Wei

Reputation: 281

I just fixed the issue. The reason for this issue is you use 'com.facebook.android:facebook-android-sdk:4.+', Facebook auto update and have an error inside the SDK. Changing the version can fix the problem.

Use:

com.facebook.android:facebook-android-sdk:4.35.0

Upvotes: 25

aveuiller
aveuiller

Reputation: 1551

I think you should look closely at this line:

08-31 13:36:19.018 13207-13207/com.knowyourmeds E/com.facebook.internal.AttributionIdentifiers: getAttributionIdentifiers should not be called from the main thread

I think you should try to create an AsyncTask to call this method, as well as any other call requiring heavy processing (network, computation, ...). Currently your UI is waiting for all the processing to finish before drawing.

This comes from speculations, it depends on your code organization, but that's the most plausible explanation.

Upvotes: 1

Related Questions