ReallySmallSoftware / cordova-plugin-firebase-crashlytics

Google Firebase Crashlytics Cordova plugin
Other
32 stars 80 forks source link

Crashlytics Developer Tools error. #8

Closed YoavHortman closed 3 years ago

YoavHortman commented 6 years ago

Steps to Reproduce the Problem

After adding the plugin and running cordova run android I get the error: Execution failed for task ':fabricGenerateResourcesDebug'.

Crashlytics Developer Tools error.

Specifications

Im using react with cordova BTW.

ReallySmallSoftware commented 6 years ago

Sorry for the delay in responding. Can I ask if you have installed the cordova-support-google-services plugin?

alizaidi606 commented 6 years ago

I was having the same issue as mentioned above, then I added cordova-support-google-services plugin, which resolved above issue but now I am having this error

`What went wrong: A problem occurred evaluating root project 'android'.

Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] For input string: "+"

`

YoavHortman commented 6 years ago

Same here @alizaidi606

ReallySmallSoftware commented 6 years ago

Do either of you have any other firebase related plugins installed? Are there any lines in platforms/android/project.properties that have a '+' in them?

alizaidi606 commented 6 years ago

@ReallySmallSoftware yes there are, here's the list of all the plugins listed in project.properties

cordova.system.library.2=com.google.gms:google-services:+ cordova.system.library.3=com.google.android.gms:play-services-tagmanager:+ cordova.system.library.4=com.google.firebase:firebase-core:+ cordova.system.library.5=com.google.firebase:firebase-messaging:+ cordova.system.library.6=com.google.firebase:firebase-crash:+ cordova.system.library.7=com.google.firebase:firebase-config:+ cordova.system.library.8=com.android.support:support-v4:26.+ cordova.system.library.9=com.android.support:appcompat-v7:26.+ cordova.system.library.10=com.microsoft.appcenter:appcenter-analytics:1.1.0 cordova.system.library.11=com.microsoft.appcenter:appcenter-crashes:1.1.0

alizaidi606 commented 6 years ago

@ReallySmallSoftware I solved the above issue by replacing + with 11.6.0 in other firebase plugins and it solved this Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] For input string: "+" error but new error is

ERROR - Crashlytics Developer Tools error. java.lang.IllegalArgumentException: Crashlytics found an invalid API key: null. Check the Crashlytics plugin to make sure that the application has been added successfully! Contact support@fabric.io for assistance.

alizaidi606 commented 6 years ago

I have used crashlytics in native android projects before but back then it was not acquired by google, so I had to create separate crashlytics project and include its api key in Androidmanifet.xml, now that it is acquired by google and we are including google-services.json file but there is no specific crashlytics key so may be this is the issue though I am not sure. I also read this answer https://stackoverflow.com/questions/27359392/crashlytics-android-studio-gradle-build-failed/27479350#27479350 If this is the issue and we have to create separate project than how do we add fabric key?

alizaidi606 commented 6 years ago

I couldn't find any solution so ended up using stand alone cordova fabric plugin and linking it with my firebase project.

nkukehenry commented 4 years ago

You need to edit the line below in platform build.gradle (platforms/android/build.gradle) classpath 'com.google.gms:google-services:4.1.0' to: classpath 'com.google.gms:google-services:4.2.0'

ReallySmallSoftware commented 3 years ago

I have released a new version with updated dependencies, removing the original Fabric dependencies. Please try again and see how it goes.