首页 > 解决方案 > 将 firebase 配置为使用 java 包而不是应用程序 ID

问题描述

我有两个使用相同 id 的应用程序,一个是 android 手机,在 android 电视上。他们需要有相同的 id,因为 google play store,所以我不能在 firebase 上给他们不同的应用程序 ID。

有什么方法可以将firebase配置为使用java包而不是build.gradle中的applicationId?

还是有另一种方法来解决这个问题,而不改变 build.gradle 中的 applicationID?

标签: androidfirebasegoogle-cloud-firestore

解决方案


试试这种格式:

android {
    defaultConfig {
        applicationId "com.example.myapp"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    ...
}

推荐阅读