我正在获得 D8:当我添加 firebase_admob 客栈时,程序类型已经存在:com.google.android.gms.internal.measurement.zzfe 。
如果我添加了Google Play服务版本,则该应用一开始就崩溃了。我曾尝试降级该版本,但无法正常工作。
这是我的pubspec.yaml-
名称:****** 描述:一个新的Flutter项目。
<dependency>
<groupId>com.print.assess</groupId>
<artifactId>mns.pro</artifaxtId>
<version>2.0</version>
</dependency>
这是我的build.gradle-
environment:
sdk: '>=2.0.0-dev.68.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
cupertino_icons:
photo_view: ^0.2.2
cloud_firestore: ^0.9.7
firebase_admob: ^0.8.0+3
share: ^0.6.0+1
permission_handler: ^3.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons:
flutter_icons:
android: true
ios: true
image_path: 'assets/icon/app_icon.png'
adaptive_icon_background: '#FFFAFAFA'
adaptive_icon_foreground: 'assets/icon/app_icon.png'
assets:
- assets/rangoli_loader.gif
fonts:
- family: Raleway
fonts:
- asset: assets/fonts/Raleway-Regular.ttf
这是我的app / build.gradle-
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}