【问题标题】:Android building bundles errors or doesnt generate the bundleAndroid 构建捆绑包错误或不生成捆绑包
【发布时间】:2021-10-19 15:40:46
【问题描述】:

我完全没有问题构建任何构建类型的 APK,但捆绑包...是的,它们几乎总是出错,平均需要大约 3-4 次构建才能获得可以上传到 Play 商店的捆绑包。有时他们不会出错,但 .aab 不在构建目录中(但是 .apk 和 output-metadata.json 是)。

在每次“新”构建时,第一次尝试总是返回此错误

A problem was found with the configuration of task ':app:produceInternalTestingBundleIdeListingFile' (type 'BundleIdeModelProducerTask').
  - Type 'com.android.build.gradle.internal.tasks.BundleIdeModelProducerTask' property 'finalBundleFile' specifies file '/Users/{user}/AndroidStudioProjects/{project}/app/build/outputs/apk/internalTesting/app-internalTesting.aab' which doesn't exist.

没有错,文件不存在...很棒的部分是,如果您正在查看目录,它会以同样快的速度出现然后消失。

当我第二次运行构建时,它不会引发此错误。它似乎没有问题地完成,但是,该文件仍然丢失。我检查了没有返回任何内容的防火墙和防病毒日志。在禁用的情况下再次对此进行了测试,但这也没有帮助。

尝试几次后 .aab 就会出现,我可以上传它。

任何帮助将不胜感激。

Android Studio 北极狐 | 2020.3.1 构建 #AI-203.7717.56.2031.7583922,构建于 2021 年 7 月 26 日 运行时版本:11.0.10+0-b96-7281165 x86_64 虚拟机:JetBrains s.r.o 的 OpenJDK 64 位服务器虚拟机。 macOS 11.0.1 内存:2048M 核心数:12

带有插件 7.0.0 的 Gradle 7.0.2

【问题讨论】:

    标签: android gradle android-app-bundle


    【解决方案1】:

    我仍然没有这个问题的答案。创建捆绑包的唯一可靠方法是使用终端。

    ./gradlew clean :app:bundleRelease

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-03
      • 1970-01-01
      • 2014-11-21
      • 2014-11-03
      • 2015-01-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多