[英]Firebase Admob Incompatible version with Firebase packages
These are the packages and there versions这些是软件包和版本
firebase_core: ^0.7.0
firebase_auth: ^0.20.0
firebase_analytics: ^7.0.1
firebase_admob: ^0.11.0+1
cloud_firestore: ^0.16.0
meta: ^1.2.4
Gradle Properties Gradle 属性
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
The result when building the app构建应用程序时的结果
BUILD FAILED in 5m 30s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 334.2s (!)
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Exception: The plugin cloud_firestore could not be built due to the issue above.
Running Gradle task 'assembleAarRelease'...
I encountered the same error and I fixed it by updating my Graddle , try this one:我遇到了同样的错误,我通过更新我的 Graddle修复了它,试试这个:
android/build.gradle : android/build.gradle :
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
}
then update the distributionUrl
in gradle-wrapper.properties :然后更新gradle-wrapper.properties中的
distributionUrl
:
distributionUrl = https\://services.gradle.org/distributions/gradle-6.5-all.zip
In my case, the solution was:就我而言,解决方案是:
1- android/build.gradle: 1- android/build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
}
2- gradle-wrapper.properties: 2- gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
3- Run Command: 3-运行命令:
flutter channel master
4- Run Command: 4-运行命令:
flutter clean
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.