简体   繁体   English

构建目录中生成的内容和中间文件夹以及缺少输出文件夹的原因

[英]what is generated and intermediates folders in build directory and why outputs folder is missing

I'm building application with Android Studio and Gradle. 我正在使用Android Studio和Gradle构建应用程序。 When the build is finished the build folder contains the following folders: 构建完成后, build文件夹包含以下文件夹:

- assets
- CordovaLib
  - build
  - src
  - build.gradle
- gradle
- src
  - com.my.package
    - CordovaApp
- build.gradle
- build
  - generated
  - intermediates
  - outputs        //not displayed in android studio's project tree
  - tmp            //not displayed in android studio's project tree

1) What are generated, intermediates and tpm folders? 1)生成什么,中间体和tpm文件夹?
2) Why aren't the outputs and tmp folder shown in studio's project tree? 2)为什么工作室的项目树中没有显示输出和tmp文件夹?

The "generated" folder contains java code generated by Android Studio for the module. “generated”文件夹包含Android Studio为模块生成的java代码。 The primary file here is "R.java" which assigns symbolic names to each of the items in the "res" directory so they can be referenced in java source code. 这里的主要文件是“R.java”,它为“res”目录中的每个项目分配符号名称,因此可以在java源代码中引用它们。

The "intermediates" folder contains individual files that are created during the build process and which are eventually combined to produce the "apk" file. “intermediates”文件夹包含在构建过​​程中创建的各个文件,这些文件最终组合在一起以生成“apk”文件。

The output folder is missing because the module ".iml" file explicitly excludes it with the following statement: 输出文件夹丢失,因为模块“.iml”文件使用以下语句显式排除它:

<excludeFolder url="file://$MODULE_DIR$/build/outputs" />

Remove that line and the "output" directory will appear under build. 删除该行,“output”目录将显示在build下。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android:中间目录中缺少资源(是否是要怪?) - Android: Missing Resource in Intermediates Directory (Is Gradle to Blame?) 如何生成android_stubs_current_intermediates目录中的.java文件? - How are .java files in android_stubs_current_intermediates directory generated? 无法删除目录:C:\\Users\\myProject\\app\\build\\intermediates\\builds - Unable to delete directory: C:\Users\myProject\app\build\intermediates\builds 尝试删除 app/build/intermediates/manifests/full/debug/output.json 或清理您的构建目录 - Try to remove app/build/intermediates/manifests/full/debug/output.json or clean your build directory Flutter:build/app/outputs下的apk/release目录和flutter-apk目录有什么区别? - Flutter: What is the difference between the apk/release directory and flutter-apk directory under build/app/outputs? 读取 build/intermediates/data-binding-compiler/debug/dependent-lib-artifacts 目录的内容时出错 - Error reading contents of build/intermediates/data-binding-compiler/debug/dependent-lib-artifacts directory 错误:资源目录\\app\\build\\intermediates\\res\\merged\\debug&#39;不存在 - Error:resource directory\app\build\intermediates\res\merged\debug' does not exist Flutter Android 在中间体上构建失败/compiled_local_resources/debug/out' 不是可读目录 - Flutter Android build fails on intermediates/compiled_local_resources/debug/out' is not a readable directory 错误:无法创建目录\\ app \\ build \\ intermediates \\ incremental \\ packageDebug \\ zip-cache - Error:Cannot create directory \app\build\intermediates\incremental\packageDebug\zip-cache 生成的类列表不存在{module root} \\ build \\ intermediates \\ data-binding-info \\ release \\ _generated.txt - Generated class list does not exist {module root}\build\intermediates\data-binding-info\release\_generated.txt
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM