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

可紊 提交于 2021-02-06 15:14:32

问题


I'm building application with Android Studio and Gradle. When the build is finished the build folder contains the following folders:

- 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?
2) Why aren't the outputs and tmp folder shown in studio's project tree?


回答1:


The "generated" folder contains java code generated by Android Studio for the module. 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.

The "intermediates" folder contains individual files that are created during the build process and which are eventually combined to produce the "apk" file.

The output folder is missing because the module ".iml" file explicitly excludes it with the following statement:

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

Remove that line and the "output" directory will appear under build.



来源:https://stackoverflow.com/questions/27087309/what-is-generated-and-intermediates-folders-in-build-directory-and-why-outputs-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!