当我在模拟器或真实设备上安装我的应用程序时,我正在尝试在Android应用程序上设置Firebase Firebase无法识别我的安装,并坚持进行Firebase安装的第四步(运行您的应用程序以验证安装) 我跳过了该步骤,但安装数量或通知接收方计数不会显示我的应用。 有趣的是,我在一个测试项目中实现了它,并且可以正常工作。
这是我的礼物
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 29
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "netherland.com.app.vanlaartsoapp"
minSdkVersion 17
targetSdkVersion 29
versionCode 10
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-alpha08'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.karumi:dexter:5.0.0'
implementation 'androidx.room:room-runtime:2.2.0-alpha01'
annotationProcessor "androidx.room:room-compiler:2.2.0-alpha01"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-core:17.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.google.firebase:firebase-messaging:20.0.0'
}
应用插件:“ com.google.gms.google-services”
答案 0 :(得分:1)
确保将google.json文件添加到您的项目中