Google Play上传问题:“你的Android App Bundle需要有包名com.x.x.base" [英] Google Play upload problem: "Your Android App Bundle needs to have the package name com.x.x.base"

查看:47
本文介绍了Google Play上传问题:“你的Android App Bundle需要有包名com.x.x.base"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一个正在开发的应用程序上传到 Google Play Console,内部测试轨道.该应用程序具有两个风味维度和两个动态特性,最后两个仅是资源(无代码).我依靠 Android Studio 生成目录结构和签名包.

包的名称是 com.something.something.上传失败并显示消息您的 APK 或 Android App Bundle 需要具有包名称 com.something.something.base".

我无法找到问题的根源,尽管看起来应该与风味维度有关.另一方面,我上传单个 apk 没有问题,没有动态功能.

我不确定代码的哪一部分与此处相关,这可能是我的问题的一部分,但我的主要构建 gradle 看起来像这样

应用插件:'com.android.application'安卓 {compileSdkVersion 27默认配置{applicationId 'com.something.something'....}构建类型{释放 {minifyEnabled trueproguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}调试{//testCoverageEnabled 假}}风味维度版本"产品风味{小的 {维度版本"}满的 {维度版本"}}dynamicFeatures = [":feat1", ":feat2"]}依赖{...}

我不想用不相关的代码来增加问题的负担,但如果对问题可能出在哪里有一些直觉,我可以提供更多信息.

如果您就如何在此处进行调试提供任何建议,我将不胜感激.(上传速度非常慢,反复试验不是一种选择.)

解决方案

感谢大家对答案的尝试.以下是我对这个问题的了解以及我如何解决"它.

我的问题始于 Google Play Console (GPC) 坚持将

因此,在我第一次上传时,我有一个叫做 base 的味道,我没有意识到 AS 把它作为我包名称的后缀.从那时起,GPC 将不会以任何其他名称为我的应用程序打包.

这里不相关的一件事是动态功能 - 它们恰好是我第二次上传尝试的一部分.

我已要求 Google 删除我的应用,以便我可以从头开始.

I am trying to upload an application under development to Google Play Console, internal testing track. The application has two flavor dimensions and and two dynamic features, the last two being resources only (no code). I am relying on Android Studio to generate the directory structure and the signed bundle.

The name of the package is com.something.something. The upload fails with the message "Your APK or Android App Bundle needs to have the package name com.something.something.base."

I cannot track down the source of the problem, though it looks like it should have something to do with the flavor dimensions. On the other hand, I had no problem uploading a single apk, without the dynamic features.

I am not sure which part of the code is relevant here, which is probably part of my problem, but my main build gradle looks like this

apply plugin: 'com.android.application'

android {

    compileSdkVersion 27
    defaultConfig {
        applicationId 'com.something.something'
        ....
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            //testCoverageEnabled false
        }
    }

    flavorDimensions "version"
    productFlavors {
        small {
            dimension "version"
        }
        full {
            dimension "version"
        }
    }

    dynamicFeatures = [":feat1", ":feat2"]

}

dependencies {
    ...
}

I do not want to burden the question with irrelevant code, but can provide more if there is some intuition about where the problem might be.

I would be grateful for any suggestion on how to approach the debugging here. (Uploading is painfully slow, trial and error is not much of an option.)

解决方案

Thank you all for taking a shot at the answer. Here is what I learned about this issue and how I "solved" it.

My problem starts with Google Play Console (GPC) insisting that an app name be associated with the very first package name you have uploaded. This is in addition to having one app = one package name rule. If you are still in the draft stage, you can delete the package from your "All applications" list in GPC, and upload a package with different name, but once it's published - no such luck. The way GPC is designed, all my future uploads should have the suffix ".base", if this is what my first upload had.

Next, Android Studio (AS), does something called manifest file merging. (@Fantômas, your audience may not be as omniscient as you are - the behavior of AS is relevant here, and with your permission I would return the tag.) When you choose the flavor for the bundle, the name of the flavor is suffixed to create the package name in the merged AndroidManifest file, irrespective of the name you specify in your main AndroidManifest.xml, as you can check if you choose to "analyze" (the name of the link after the bundle is generated) newly created bundle:

Thus, in my first upload I had a flavor called base, and I did not realize that AS tacked it as the suffix on the name of my package. From that point on, GPC will not take a package for my app by any other name.

One thing that is irrelevant here are dynamic features - they just happened to be part of my second upload attempt.

I have asked Google to delete my app so I can start from scratch.

这篇关于Google Play上传问题:“你的Android App Bundle需要有包名com.x.x.base"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆