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 22.214.171.124 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?
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
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.
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.
4.35.0 is the stable version of the SDK from facebook GitHub https://github.com/facebook/facebook-android-sdk
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
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.
I had same problem this library worked for me because this is facebook