Firebase App unable to Compile on Android with AAPT error

I have done the steps but then I get another error

Error de Crashlytics Developer Tools.

I modified the project.properties file located at ./platforms/android/project.properties

...
cordova.system.library.1=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.2=com.google.firebase:firebase-core:+
cordova.system.library.3=com.google.firebase:firebase-messaging:+
cordova.system.library.4=com.google.firebase:firebase-config:+
cordova.system.library.5=com.google.firebase:firebase-perf:+
...

to

...
cordova.system.library.4=com.google.android.gms:play-services-tagmanager:16.0.8
cordova.system.library.5=com.google.firebase:firebase-core:16.0.8
cordova.system.library.6=com.google.firebase:firebase-messaging:17.5.0
cordova.system.library.7=com.google.firebase:firebase-config:16.4.1
cordova.system.library.8=com.google.firebase:firebase-perf:16.2.4
...

After having made all these changes I still get the same error (Error de Crashlytics Developer Tools)

This is my info of ionic

cli packages: (C:\Users\TheNewRol\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.3
    ionic (Ionic CLI) : 3.20.1

global packages:

    cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)

local packages:

    @ionic/app-scripts : 3.2.2
    Cordova Platforms  : android 7.1.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v10.15.3
    npm  : 6.9.0
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

I’ve also tried the android version 8 and the error persists

Thx dude, this is awesome, saved two days of work!

thanks this work for me, great you save my day

i m getting this error also after run the command of ionic cordova run android

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

this. is my plug in list

com-badrit-base64 0.2.0 “Base64”
cordova-plugin-android-permissions 1.0.0 “Permissions”
cordova-plugin-androidx 1.0.2 “cordova-plugin-androidx”
cordova-plugin-androidx-adapter 1.0.2 “cordova-plugin-androidx-adapter”
cordova-plugin-camera 4.0.3 “Camera”
cordova-plugin-crop 0.3.1 “CropPlugin”
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-file-transfer 1.7.1 “File Transfer”
cordova-plugin-firebase 2.0.5 “Google Firebase Plugin”
cordova-plugin-google-analytics 1.8.6 “Google Universal Analytics Plugin”
cordova-plugin-ionic-keyboard 2.1.3 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 1.2.1 “cordova-plugin-ionic-webview”
cordova-plugin-media-capture 3.0.2 “Capture”
cordova-plugin-network-information 2.0.1 “Network Information”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-telerik-imagepicker 2.3.2 “ImagePicker”
cordova-plugin-video-editor 1.1.3 “VideoEditor”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-plugin-zip 3.1.0 “cordova-plugin-zip”

2 Likes

You save my life!!! I spent 4 days to find a solution, thanks a lot

It worked for me, tnks.

I have applied also arcseldon answer from

Then I opened it through Android Studio and clean the project with “Build > Clean Project” from the menu. After that everything worked fine.

Actually, I need to set my CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL to .bash_profile

it will help to you also alexasilock

process went a tep further after updating my versions to those but it still failed. I think the problem is I have other libraries as :

cordova.system.library.6=com.android.support:support-annotations:27.+
cordova.system.library.7=com.android.support:support-v4:25.+
cordova.system.library.8=com.android.support:appcompat-v7:25.+
cordova.system.library.9=com.soundcloud.android:android-crop:1.0.0@aar
cordova.system.library.10=com.android.support:support-v4:24.1.1+

So where can I find proper version for those libraries as well ? Thanks

I want to try this method but I am scared my plugins won’t work lol. Did you guys have any issue with plugins after upgrade ?

UPDATE: You can skip the updating of cordova android and just modify the firebase-core and firebase-messaging versions. I had other issues using cordova 8.0.0… I.E. I could no longer tap into input fields that exist inside ion-content when the app first loaded unless I first tapped somewhere else on the screen… Everything is working successfully on cordova 7.1.0


I had this issue…

My solution was to upgrade to android 8.0.0 and then edited the project properties file to version lock firebase messaging to 17.5.0 and firebase core to 16.0.8.

Was able to build after that.

STEPS:

ionic cordova platform rm android
ionic platform add android@8.0.0

Edit: project.properties file in platforms/android

com.google.firebase:firebase-core:16.0.8
com.google.firebase:firebase-messaging:17.5.0

Thanks a lot, and this works!
You saved me from getting fired

1 Like

Worked for me, thanks !!

Does any one facing http request failure while running the app in real deviecs. I am unable to open http urls but https services are working fine.

This solution solved my problem Thanks a lot…I was banging my head from yesterday

This solution worked for me paired with this fork of cordova-plugin-firebase:

Thanks!

Many thanks. This works!:+1:

I followed the steps, the build was done successfully, but when running the application it is not requested http and it presents an error.

Hi,
how can I solve this problem if I can’t upgrade my cordova-android@7.1.4 to 8?
I have to use 7.1.4 because of some incompatible plugins.

Thanks to @JorgeU for putting me on the right path. Lifesaver.

Solution didn’t entirely work because I was still getting a Firebase Crashlytics Error.

* What went wrong:
Execution failed for task ':app:fabricGenerateResourcesDebug'.
> Crashlytics Developer Tools error.

Thankfully, as you said, reading the full post helped, as the author you mentioned specified some additional info for firebase errors on the Stack Overflow post

These are the exact steps I took. 10 hours of no progress and suddenly my app was building again. If you get any errors make sure to read the full post from the Stack Overflow author and any of the hyperlinks he provides to packages. The packages themselves have their own version requirements so make sure you have up to date versions of everything.

  1. Run:
cordova plugin add cordova-plugin-androidx
  1. Run:
cordova plugin add cordova-plugin-androidx-adapter

2.5 (not sure if this one is necessary but I did it in response to some warnings) Run:

npm i -g cordova-res
  1. Run:
ionic cordova remove platform android 
  1. Run:
cordova plugin remove cordova-plugin-firebase
  1. Run:
npm install
  1. Run:
cordova plugin add cordova-plugin-firebasex
  1. Run:
ionic cordova platform add android 
  1. (Voila!) Run:
ionic cordova build android

Hope it works for anyone getting the firebase crashlytics error.

same error here, any solutions ?