【问题标题】:Cannot find PROCESSED_RES output for Main找不到 Main 的 PROCESSED_RES 输出
【发布时间】:2019-06-11 20:41:58
【问题描述】:

在构建 android app bundle 时出现此错误 -

找不到 Main{type=MAIN, fullName=debug, 的 PROCESSED_RES 输出, 过滤器=[], versionCode=-1, versionName=null}

我刚刚在现有的 android studio 项目中添加了一个动态功能模块,在构建 android app bundle 时出现此错误

【问题讨论】:

标签: android android-studio


【解决方案1】:

每次发布​​时更改 versionName 和 versionCode 增量

android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
    applicationId "com.company.app"
    minSdkVersion 16
    targetSdkVersion 28
    versionCode 14       // increment with every release
    versionName '1.4.8'   // change with every release

}

}

【讨论】:

  • 试试这个 android { applicationVariants.all { variant -> variant.outputs.each { output -> output.outputFile = new File( output.outputFile.parent, output.outputFile.name.replace(" .apk", "-${variant.versionName}.apk")) } } }
  • 还是不行,请你解释一下这个错误的含义
  • 处理资源目录中的“out”文件夹为功能模块的构建目录是空的。这个是用于示例的问题
  • 会发生什么?您是否尝试运行任何其他人或 github 项目的代码,如果是,请引发此错误,然后将此答案标记为正确答案
  • 我没有运行任何其他人的代码或 github 项目,但就像我在问题陈述中提到的那样,我在现有的 android studio 项目中添加了一个动态功能模块,在构建 android app bundle 时出现此错误
猜你喜欢
  • 2019-10-25
  • 2020-12-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-09
  • 1970-01-01
  • 2011-08-15
  • 2021-11-14
相关资源
最近更新 更多