When I run the command ionic cordova platform add [email protected] :
I see the following message
Installing "cordova-support-google-services" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 10.0.1, failed version requirement: <9.0.0
Which eventually leads to the error:
A problem was found with the configuration of task ':app:uploadCrashlyticsMappingFileRelease' (type 'UploadMappingFileTask').
- Type 'com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask' property 'googleServicesResourceRoot' doesn't have a configured value.
Reason: This property isn't marked as optional and no value has been configured.
Possible solutions:
1. Assign a value to 'googleServicesResourceRoot'.
2. Mark property 'googleServicesResourceRoot' as optional.
Is there any other plugin I can install to sort this issue?
Listing all the installed plugins below for reference:
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-advanced-http 3.2.2 "Advanced HTTP plugin"
cordova-plugin-android-permissions 1.1.2 "Permissions"
cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-app-version 0.1.12 "AppVersion"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-chooser 1.3.1 "Chooser"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-enable-multidex 0.2.0 "Enable Multidex"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-filepath 1.5.6 "cordova-plugin-filepath"
cordova-plugin-firebasex 14.0.0 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-googlemaps 2.7.1 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-nativegeocoder 3.4.1 "NativeGeocoder"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-proguard 2.2.0 "Cordova plugin ProGuard"
cordova-plugin-splashscreen 5.0.4 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-unique-device-id2 2.0.0 "UniqueDeviceID"
cordova-sqlite-storage 6.0.0 "Cordova SQLite storage plugin - cordova-sqlite-storage plugin version"
cordova-support-google-services 1.4.1 "cordova-support-google-services"
phonegap-plugin-barcodescanner 8.1.0 "BarcodeScanner"
phonegap-plugin-mobile-accessibility 1.0.5-dev "Mobile Accessibility"
CodePudding user response:
You're using an obsolete plugin; replace with:
<config-file target="config.xml" parent="/*">
<preference name="GradlePluginGoogleServicesEnabled" value="true"/>
<preference name="GradlePluginGoogleServicesVersion" value="4.3.10"/>
</config-file>
Ionic 4 is also outdated.