首页 > 解决方案 > 不适用于包名称和 firebase

问题描述

我有一个应用程序上传到 Play 商店。包是:com.pathapp但随后用 gradle 生成了两个 apk,com.path调试和发布(没有应用程序)。现在我想集成firebase,但我不知道应用程序的名称是什么我必须放在firebase中,如果com.path或com.pathapp为了有一个构造良好的google-services.json文件。

如果我将目录的原始包从pathapp更改为path,会有问题吗?

标签: androidfirebasepackagefirebase-cloud-messaging

解决方案


android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.example"
    minSdkVersion 16
    targetSdkVersion 26
    versionCode 1
    versionName "1.00"
}
}

applicationId在 gradle 中是你的包名。

所以你需要在 firebase 控制台中添加它。

在上面的例子中,包名是com.example. 同样,检查你的 gradle。


推荐阅读