Android-Cordova 10.0.1任务:APP:processDebugGoogleServices失败 [英] Android-Cordova 10.0.1 Task :app:processDebugGoogleServices FAILED

查看:56
本文介绍了Android-Cordova 10.0.1任务:APP:processDebugGoogleServices失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Cordova-Android版本从9.0升级到10.0.1,在使用-ion Cordova build Android构建Cordova应用时遇到以下问题

错误:

Task :app:processDebugGoogleServices FAILED
Some problems were found with the configuration of task ':app:processDebugGoogleServices' (type 'GoogleServicesTask').
  - In plugin 'com.google.gms.google-services' type 'com.google.gms.googleservices.GoogleServicesTask' field 'intermediateDir' without corresponding getter has been annotated with @OutputDirectory.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'intermediateDir'.
      2. Remove the annotations on 'intermediateDir'.

    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.    
  - In plugin 'com.google.gms.google-services' type 'com.google.gms.googleservices.GoogleServicesTask' field 'packageNameXOR1' without corresponding getter has been annotated with @Input.

信息

Cordova CLI-10.0.0

Cordova Android:10.0.1

节点:v12.18.2

NPM:6.14.13

项目安装插件

@havesource/cordova-plugin-push: 2.0.0
    cordova-android-play-services-gradle-release: 4.0.0
    cordova-background-geolocation-lt: 4.0.1
    cordova-plugin-advanced-http: 3.1.0
    cordova-plugin-android-permissions: 1.1.2
    cordova-plugin-androidx-adapter: 1.1.3
    cordova-plugin-androidx: 3.0.0
    cordova-plugin-app-launcher: 0.4.0
    cordova-plugin-app-version: 0.1.12
    cordova-plugin-appminimize: 1.0.1
    cordova-plugin-background-fetch: 7.0.1
    cordova-plugin-badge: 0.8.8
    cordova-plugin-camera: 5.0.2
    cordova-plugin-device: 2.0.3
    cordova-plugin-file-opener2: 3.0.5
    cordova-plugin-file: 6.0.2
    cordova-plugin-filepath: 1.6.0
    cordova-plugin-googlemaps: 2.7.1
    cordova-plugin-inappbrowser: 5.0.0
    cordova-plugin-ionic-keyboard: 2.2.0
    cordova-plugin-ionic-webview: 4.2.1
    cordova-plugin-local-notification: 0.9.0-beta.2
    cordova-plugin-market: 1.2.0
    cordova-plugin-ms-azure-mobile-apps: 2.0.2
    cordova-plugin-network-information: 2.0.2
    cordova-plugin-sim: 1.3.3
    cordova-plugin-sms-retriever-manager: 1.0.2
    cordova-plugin-splashscreen: 6.0.0
    cordova-plugin-statusbar: 2.4.3
    cordova-plugin-twilio-chat: 3.3.0
    cordova-plugin-whitelist: 1.3.4
    cordova-sqlite-storage: 6.0.0
    phonegap-plugin-barcodescanner: 8.1.0
    phonegap-plugin-multidex: 1.0.0

有人知道如何解决此问题吗?

推荐答案

我已使用在config.xml文件中添加以下首选项解决了此问题:

<preference name="android-targetSdkVersion" value="30" />
<preference name="AndroidXEnabled" value="true" />
<preference name="GradlePluginGoogleServicesEnabled" value="true" />
 
 <!-- Updated the version of com.google.gms.google-services -->
<preference name="GradlePluginGoogleServicesVersion" value="4.3.8" /> ,

Package.json:

"cordova-android": "^10.1.0"

Gradle版本:7.1.1

这篇关于Android-Cordova 10.0.1任务:APP:processDebugGoogleServices失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆