Crashlytics found an invalid API key: @string/twitter_consumer_secret, when mofing from Crashreporting to Crashlytics in Firebase

Crashlytics found an invalid API key: @string/twitter_consumer_secret, when mofing from Crashreporting to Crashlytics in Firebase



I am in the process of migrating from firebase crash reporting to Firebase Crashlytics (as we have to until 9th September), following the guides here
https://firebase.google.com/docs/crashlytics/upgrade-from-crash-reporting
and double checked I have no left over
I followed the guide here
https://firebase.google.com/docs/crashlytics/get-started?authuser=0



I also searched around quiet a while, and found some similar questions, but no answer helped, or they are too old to apply, because they are pre Firebase versions.



when i do a "build/clean" in Android Studio, I get the following error


Crashlytics found an invalid API key: @string/twitter_consumer_secret.
Check the Crashlytics plugin to make sure that the application has been added successfully!
Contact support@fabric.io for assistance.



So I searched for the 'twitter_consumer_secret' in my whole project and for the word "twitter". The only spot it is found, is the generated Android Manifest in the build path.



So I assume Crashlytics complains, because it does not find a valid key there.



But why is this 'twitter_consumer_secret' generated there ?



I have the following in the dependency's section


implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation 'com.google.gms:google-services:4.1.0'
apply plugin: 'com.google.gms.google-services' // at the end of the gradle file
apply plugin: 'io.fabric' // at top of the gradle file after 'com.android.application'



I really hoped to get this done today, so any help is more then welcome.



To add:
If I only remove the


apply plugin: 'io.fabric'



the error goes away, but Crashlytics does not seem to work.





Mike from Firebase here. I followed up via your email into our support channel.
– Mike Bonnell
Aug 27 at 12:59





Mike, looks like your email got lost. This might be due to my Google Drive run out of space, which also seems to block gmail from receiving. Which is shown on web login, but not in the APP. This should be fixed by now, apologize for that. May ask you to resend your message.
– Juergen S.
Aug 29 at 9:12





Hmm, I tried searching for the email and can't find it either. Can you email support(at)fabric(dot)io?
– Mike Bonnell
Aug 29 at 20:33




1 Answer
1



It looks like the issue is in com.google.gms. Use version 4.0.1 instead of 4.1.0:


com.google.gms


4.0.1


4.1.0


buildscript
...
dependencies
...
classpath 'com.google.gms:google-services:4.0.1'




It should solve the issue.





I gave it a try, but got the same result. I will reach out to support, as I have no idea, why this API key gets build.
– Juergen S.
Aug 31 at 7:58





Note, that this should be in android/build.gradle, not in android/app/build.gradle. Also do not forget to remove your implementation 'com.google.gms:google-services:4.1.0' line, clean cache and perform gradle sync.
– Alexandr Priezzhev
Aug 31 at 18:17



android/build.gradle


android/app/build.gradle


implementation 'com.google.gms:google-services:4.1.0'






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)