Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashlytics Developer Tools error #1006

Closed
globules-io opened this issue Feb 16, 2019 · 29 comments · Fixed by ense-org/cordova-plugin-firebase#1 or #1011
Closed

Crashlytics Developer Tools error #1006

globules-io opened this issue Feb 16, 2019 · 29 comments · Fixed by ense-org/cordova-plugin-firebase#1 or #1011

Comments

@globules-io
Copy link

Describe the bug
Does not work with Android 8.0.0, but works with Android 7.1.4

To Reproduce
cordova platform add android@8.0.0
cordova build android

Console Logs
Task :app:fabricGenerateResourcesDebug FAILED
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!

Plugin Version
Plugin 2.0.5
Cordova 7.1
Android 8.0.0

@diogeneshamilton
Copy link
Contributor

I found that if you update this line in the project's build.gradle:

classpath 'com.google.gms:google-services:4.1.0' // google-services dependency from cordova-plugin-firebase

to

classpath 'com.google.gms:google-services:4.2.0' // google-services dependency from cordova-plugin-firebase

Then it works. Not sure if there's a way to upgrade this in this plugin directly. Hope this helps!

@globules-io
Copy link
Author

Not working for me, it then get
Could not find com.google.android.gms:strict-version-matcher-plugin:1.1.0.
Required by: unspecified:unspecified:unspecified > com.google.gms:google-services:4.2.0

@peterpeterparker
Copy link

The above workaround of @diogeneshamilton, using v4.2.0 for the google-services, worked fine for me too. Thx 👍

@ramanRajSaxena07
Copy link

Not working for me, it then get
Could not find com.google.android.gms:strict-version-matcher-plugin:1.1.0.
Required by: unspecified:unspecified:unspecified > com.google.gms:google-services:4.2.0

Did you manage to solve this?

@globules-io
Copy link
Author

@ramanRajSaxena07 Are you asking me?

@adipascu
Copy link

adipascu commented Feb 27, 2019

Until this is fixed you can use the workaround from #1011

npx -c -- cordova plugin remove cordova-plugin-firebase
npx -c -- cordova plugin add https://github.com/arnesson/cordova-plugin-firebase.git#pull/1011/head

The install will be a bit slow because cordova-plugin-firebase is a huge repo (has many commited blobs).

@rodrigograca31
Copy link

I had this very same problem. Please accept the PR as soon as possible

@ansarikhurshid786
Copy link

Meanwhile you can you use workaround. That is working for me

@rodrigograca31
Copy link

Yeah downgraded to 7.1.4

@AlexanderVagner
Copy link

+1, I also found this issue and same fix like @diogeneshamilton

@kaynz
Copy link

kaynz commented Mar 7, 2019

@globules-io
You need to add following repository before jcenter() in your cordova-plugin-firebase dev-build.gradle
@diogeneshamilton
maybe you could add this to your PR

maven { url "https://maven.google.com" }

@kaynz
Copy link

kaynz commented Mar 7, 2019

@adipascu
feel free to tell me the reason for your thumbs-down. otherwise i can't help.

@adipascu
Copy link

adipascu commented Mar 7, 2019

@kaynz

You need to add following repository before jcenter() in your cordova-plugin-firebase dev-build.gradle

Not required by me, others do not mention any issue that requires this fix.

maybe you could add this to your PR
maven { url "https://maven.google.com" }

You should post PR feedback in the PR thread, see #1011 .


@vagsa2 Please use thumbs up reaction instead of commenting if you agree with something.


@kaynz & @vagsa2
Posting here sends notifications to all the people following this thread, now you made me post, thus we are spamming more people :D

@Kalikanth
Copy link

I solved my issue by commenting apply plugin: 'io.fabric' from platforms/android/cordova-plugin-firebase/build.gradle

cdvPluginPostBuildExtras.add({
    apply plugin: 'com.google.gms.google-services'
    // apply plugin: 'io.fabric'
})

@vinaynellagi
Copy link

The above PR thread help for a while. Today all of sudden I am facing new issue -

platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:9: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
followed by 16 more errors.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

The Build worked fine until last night. Any help or is someone also finding this issue ?

@rodrigograca31
Copy link

@vinaynellagi seems there's new play services and firebase libraries version. (18.0.0) check if your code doesnt include them because "you" use "+" instead of a specific version..... I just run into that problem my self....

@vinaynellagi
Copy link

vinaynellagi commented Jun 18, 2019

@rodrigograca31 That was super quick. I am assuming that you are referring to

dependencies {
compile 'me.leolin:ShortcutBadger:1.1.4@aar'
compile 'com.google.firebase:firebase-auth:+'
compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true
}
}

inside cordova-plugin-firebase/build.gradle

I changed it to 18.0.0, 17.0.0, 16.5.0.. But none worked. Removed and stalled the plugin everytime.

@vinaynellagi
Copy link

vinaynellagi commented Jun 18, 2019

I finally got it working - Thank you @rodrigograca31 for giving me a pointer.

Here is what I did for the sake of others who might have similar issue.

  1. Removed the plugin
  2. Removed Android
  3. Installed The plugin
  4. Made the following changes in plugin.xml
		<framework src="com.google.android.gms:play-services-tagmanager:16+" />
		<framework src="com.google.firebase:firebase-core:16.+" />
		<framework src="com.google.firebase:firebase-messaging:17.+" />
		<framework src="com.google.firebase:firebase-config:16.+" />
		<framework src="com.google.firebase:firebase-perf:16.+" />
  1. Made these chnages in plugins/cordova-plugin-firebase/src/android/ build.gradle
compile 'com.google.firebase:firebase-auth:16.+' 
compile 'com.google.firebase:firebase-iid:16.+'

  1. Ran android and the build was a success. Back to how it was.

@rodrigograca31
Copy link

I think it didn't work because you have to remove and add the platform to reinstall the plugin...

ionic cordova platform rm android and ionic cordova platform add android@^8.0.0

Also have to change: https://github.com/arnesson/cordova-plugin-firebase/blob/master/plugin.xml

I got distracted and took 1 hour to submit this comment and seems you figured it out while I was distracted ..... 😂

@houd1ni
Copy link

houd1ni commented Jun 18, 2019

@rodrigograca31 is it actually working? I've tried an endless number of solutions, that cause chains of other failures all the day long O.O
Also, "removed android" is basically "cordova platform remove android" ?

@vinaynellagi
Copy link

Yes, by Removed Android I meant remove platform

@peterpeterparker
Copy link

peterpeterparker commented Jun 18, 2019

If you are facing trouble as of today (Tuesday 18th June 2019) following the libs upgrade Google published yesterday, have a look at the answer of @dpa99c in #1081 (comment) it might gives you some hints

@houd1ni
Copy link

houd1ni commented Jun 18, 2019

@vinaynellagi after all you mentioned the same:


Execution failed for task ':app:fabricGenerateResourcesDebug'.
> Crashlytics Developer Tools error.

@houd1ni
Copy link

houd1ni commented Jun 18, 2019

If you are facing trouble as of today (Tuesday 18th June 2019) following the libs upgrade Google published yesterday, have a look at the answer of @dpa99c in #1081 (comment) it might gives you some hints

It's a real deal. Thanks to this guy, I finally can get my rest.

@rodrigograca31
Copy link

rodrigograca31 commented Jun 18, 2019

Yep, I also had strange issues all day.
Was having some weird support library issues and just solved it with:

ionic cordova plugin add cordova-plugin-androidx
ionic cordova plugin add cordova-plugin-androidx-adapter

(remove ionic if u dont use it)

@jaybowman
Copy link

Thanks everyone. I was able to get my android build working following the steps above and still use cordova android@7.1.4. the last post of adding the androidx plugins requires you to update to android@8.0.0

@jitendra-Tech
Copy link

Remove this line in your AndroidManifest.xml

@maqeelqureshi
Copy link

I have added
cordova plugin add cordova-support-google-services --save
And also changes in config.xml

@DokunCodes
Copy link

Here's how i resolved mine:

  1. ionic cordova platform rm android
  2. ionic cordova plugin rm cordova-plugin-firebase
  3. ionic cordova plugin add cordova-plugin-firebase (you can skip step 2 if you've not installed the plugin before)
  4. Goto directory plugins -> cordova-plugin-firebase -> plugin.xml
  5. Copy & replace from line 58 with this
    <framework src="com.google.android.gms:play-services-tagmanager:16+" /> <framework src="com.google.firebase:firebase-core:16.+" /> <framework src="com.google.firebase:firebase-messaging:17.+" /> <framework src="com.google.firebase:firebase-config:16.+" /> <framework src="com.google.firebase:firebase-perf:16.+" />
  6. ionic cordova platform add android
  7. Goto directory platforms -> android -> build.gradle
  8. Change line 34 - from classpath 'com.google.gms:google-services:4.1.0' to classpath 'com.google.gms:google-services:4.2.0'

Run & Build again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet