Ionic - cordova-support-google-services 插件在升级到 Cordova Android 10 后安装失败
Ionic - cordova-support-google-services plugin fails to install after upgrading to Cordova Android 10
当我 运行 命令 ionic cordova platform add android@10.0.1 :
我看到以下消息
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
最终导致错误:
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.
我可以安装任何其他插件来解决这个问题吗?
下面列出所有已安装的插件以供参考:
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"
您正在使用 obsolete plugin;替换为:
<config-file target="config.xml" parent="/*">
<preference name="GradlePluginGoogleServicesEnabled" value="true"/>
<preference name="GradlePluginGoogleServicesVersion" value="4.3.10"/>
</config-file>
Ionic 4 也已经过时了。
当我 运行 命令 ionic cordova platform add android@10.0.1 :
我看到以下消息
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
最终导致错误:
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.
我可以安装任何其他插件来解决这个问题吗?
下面列出所有已安装的插件以供参考:
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"
您正在使用 obsolete plugin;替换为:
<config-file target="config.xml" parent="/*">
<preference name="GradlePluginGoogleServicesEnabled" value="true"/>
<preference name="GradlePluginGoogleServicesVersion" value="4.3.10"/>
</config-file>
Ionic 4 也已经过时了。