- Cardboard VR Projects for Android
- Jonathan Linowes Matt Schoen
- 338字
- 2021-07-16 10:54:07
The Android project structure
The root directory of your Android project contains various files and subdirectories. Or, should I say, the root folder of your Android project contains various files and subfolders. Ha ha. We'll use the words "folder" and "directory" interchangeably throughout this book, just as Android Studio also seems to do (actually, there is a difference, as discussed at http://stackoverflow.com/questions/29454427/new-directory-vs-new-folder-in-android-studio).
As shown in the Android hierarchy, in the following sample Cardboard project, the root directory contains an app/
subdirectory, which, in turn, contains the following subdirectories:
app/manifests/
: This contains theAndroidManifest.xml
manifest file that specifies the components of the application, including activities (UI), device permissions, and other configurationsapp/java/
: This contains subfolders with your application Java files that implement the application'sMainActivity
and other classesapp/res/
: This contains subfolders with resources, including the layout XML definition files, values definitions (strings.xml
,styles.xml
, and so on), icons, and other resource files
It's not a coincidence that these directories correspond to the boxes in the topmost row of the preceding Gradle build process diagram; they supply the source files that are run through the Java compiler.
Also, there are Gradle scripts under the root directory, which do not need to be edited directly since the Android Studio IDE provides convenient dialog boxes to manage the settings. In some cases, you might find it to be easier to modify these files directly.
Notice that in the upper-left corner of the hierarchy pane is a tab select menu. In the preceding screenshot, it is set to Android, which just shows the Android-specific files. There are other views that might also be useful, such as Project, which lists all the files and subdirectories under your project root directory, as shown in the following screenshot, for the same app. The Project hierarchy shows the files as they are structured on the actual filesystem. The other hierarchies artificially restructure your project to make it easier to work with.

- 24小時學會電腦組裝與維護
- 電腦軟硬件維修大全(實例精華版)
- SDL Game Development
- 辦公通信設備維修
- AMD FPGA設計優化寶典:面向Vivado/SystemVerilog
- micro:bit魔法修煉之Mpython初體驗
- Learning Game Physics with Bullet Physics and OpenGL
- OUYA Game Development by Example
- Large Scale Machine Learning with Python
- 基于Apache Kylin構建大數據分析平臺
- 筆記本電腦使用、維護與故障排除從入門到精通(第5版)
- Machine Learning with Go Quick Start Guide
- 超大流量分布式系統架構解決方案:人人都是架構師2.0
- Internet of Things Projects with ESP32
- Managing Data and Media in Microsoft Silverlight 4:A mashup of chapters from Packt's bestselling Silverlight books