当前位置: 首页 > 知识库问答 >
问题:

爱奥尼亚:谷歌Firebase更新破坏了构建

常永怡
2023-03-14

我知道这种问题已经被多次看到,因为几周前谷歌发布了一个新的Firebase版本;

许多人似乎在一些调整后成功编译,但我无法让我的应用程序在android中编译。

我花了几个小时寻找答案,但我被卡住了!

这就是错误:

The library com.google.firebase:firebase-iid is being requested by various other libraries at [[17.1.1,17.1.1]], but resolves to 19.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

我甚至尝试过这个https://github.com/arnesson/cordova-plugin-firebase/issues/1081#issuecomment-503041641但什么都没改变(看来他用的这个脚本什么都不做)

这是我的项目。属性

# This file was originally created by the Android Tools, but is now
# used by cordova-android to manage the state of the various third party
# libraries used in your application

# This is the Library Module that contains the Cordova Library, this is not
# required when using an AAR

# This is the application project.  This is only required for Android Studio Gradle projects

# Project target.
target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.gradle.include.1=cordova-plugin-badge/app-badge.gradle
cordova.system.library.1=com.android.support:support-v4:27.1.0
cordova.system.library.2=com.soundcloud.android:android-crop:1.0.0@aar
cordova.system.library.3=com.facebook.android:facebook-android-sdk:4.+
cordova.gradle.include.2=cordova-plugin-firebase/app-build.gradle
cordova.system.library.4=com.google.android.gms:play-services-tagmanager:+
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
cordova.system.library.8=com.google.firebase:firebase-iid:17.1.1
cordova.system.library.9=com.google.android.gms:play-services-auth:11.8.0
cordova.system.library.10=com.google.android.gms:play-services-identity:11.8.0
cordova.gradle.include.3=cordova-plugin-local-notification/app-localnotification.gradle
cordova.system.library.12=com.android.support:appcompat-v7:23+
cordova.gradle.include.4=cordova-plugin-telerik-imagepicker/app-ignorelinterrors.gradle
cordova.gradle.include.5=cordova-plugin-telerik-imagepicker/app-androidtarget.gradle
cordova.gradle.include.6=cordova-support-google-services/app-build.gradle

android/build。格雷德尔:

/* Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
*/

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
        maven { url 'https://maven.fabric.io/public' } // Fabrics Maven repository from cordova-plugin-firebase
    }
    dependencies {

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:4.1.0' // google-services dependency from cordova-plugin-firebase
        classpath 'io.fabric.tools:gradle:1.25.4' // fabric dependency from cordova-plugin-firebase
        // 
        // implementation "com.google.firebase:firebase-iid:17.1.1"
    }


}

allprojects {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
        google() // Google's Maven repository from cordova-plugin-firebase
    }
    //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="28.0.1" //String
      defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
      defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

// com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true// i dont like this

有什么想法吗?

谢谢!

共有1个答案

龙佐
2023-03-14

依赖项的顺序很重要。请尝试在fire base-core之后设置fire base: fire base-iid: 17.1.1

此外,请指定tagmanager的精确版本,并添加firebase auth依赖项:cordova.system.library.15=com.google.android.gms:play services tagmanager:16.0.8cordova.system.library.16=com.google.firebase:firebase auth:16.2.0

 类似资料:
  • 我正试图使用这个工具将谷歌分析添加到一个Ionic/phonegap/Covdova应用程序中。然而,我发现了以下错误: 配置根项目“android”时出现问题。无法解析配置“:_debugCompile”的所有依赖项。找不到任何与com匹配的版本。谷歌。Android游戏服务s-analytics:。在以下位置搜索:https://repo1.maven.org/maven2/com/googl

  • 这是一个简单的应用程序: 从主页按ADD时,将显示New Ionic页面。 用户键入标题和内容后,按Add,列表中将添加一条注释,然后应用程序导航回主页。我所做的是:-创建添加注释页。-在添加注释中。ts,我返回主页,如下所示: } 在添加注释中。html我定义了如下按钮: 我尝试this.navCtrl.popToRoot()但它不工作。 有人知道原因吗?

  • 谷歌宣布,自2019年8月1日起,所有新应用程序和应用程序更新都必须提供64位版本和32位版本。我有一个Ionic 3(Cordova)应用程序,我不确定这会有什么影响。具体来说,爱奥尼亚/科尔多瓦应用程序需要做什么才能满足这一要求? 从2019年8月1日开始: 发布到Google Play时,除了32位版本外,所有包含本机代码的新应用和应用更新都必须提供64位版本。

  • 我想在Ionic4(角度7)中添加一个后退按钮。但我找不到合适的角度路由器方法。 <代码>从“@角度/路由器”导入{路由器} 在组件处理程序中单击按钮时如何返回?我想使用“@角度/路由器”而不是“@角度/公共”来实现它=

  • 我刚刚开始学习angular和IONIC来构建一个应用程序。 我刚刚启动了一个包含离子的新应用程序,并从json文件中列出了一个项目列表。这很好用,但由于im跳入路由,我只看到一个空白页,我没有犯错误。 这是我的索引。html: 这是maapp.js文件: 这应该是我回家的模板(home.html) 我只是不明白这是怎么回事,也许你看到了一个错误? 提前谢谢 卢克

  • 我今天早上将Android Studio2.0预览版从4更新到5。如果我继续使用: 这仍将成功编译。但如果我移动到-alpha5,就会出现以下错误: 错误:任务执行失败:应用程序:compileReleaseJavaWithJavac。Java . io . file not found异常:....\ intermediates \ explosed-AAR \ com . Google . A