Android Studio 2.0:
default project structure
Created by:
Vyara Georgieva
Android Studio 2.0: default project
structure
See the mind map visualization
Android Studio 2.0:
default project
structure
app (module)
Gradle scripts
(module)
Gradle is the official build
system for Android Studio.
Its configuration is set in
the files contained here.
The application
The application’s
specification is
defined here
app (module)
manifests java
res
Stores the
app’s
manifest file The externalized app’s
resources are stored in
the different
subdirectories of the
project’s res directory
The app’s source
code is placed here
manifests
AndroidManifest.xml
The application
The AndroidManifest.xml
file must be in the root
directory of the application.
The information presented
here is essential. It's a must,
in order the app's code to
run.
Required elements:
<manifest> <application>
The
application
Required attributes:
xmlns:android ->
defines the Android
namespace. It must
always be set to:
"http://schemas.a
ndroid.com/apk/re
s/android"
package -> the
unique package
name for the
application. One
the app published,
the package name
cannot be
changed.
Theapplication
The app's components
are defined here.
By default, some
attributes (icon, label,
theme) are set to default
values
<activity>
The application
Each of the app's activities must be
described in the manifest via a separate
<activity> element. Otherwise they would
not be run.
java
main project
directory androidTest
test
The
application
The source code
for the whole
application is
contained here.
The content of
this module is to
be built into .apk
file and installed
on a device.
MainActivity
ApplicationTest
ExampleUnitTest
Testing
modulesThe applicationJUnit tests
inserted here
resdrawable
layout mipmap
values
Here are
stored
resources "that
can be drawn"
(.jpg, .png, .
9.png, .gif) or
XML files that
can be
compiled into a
drawable
resource
subtype)
Stores drawable files for
different launcher icon
densities. The launcher
icon reference in the
AndroidManifest.xml
should be altered as well:
android:icon="@mipmap/
ic_launcher"
The XML files from
here are compiled into
screen layouts.
Different layouts could
be provided for
different densities
External
resources
for the
application’s
elements
valuescolors.xml
dimens.xml strings.xml
styles.xml
A set list of colors
provided. The
color is specified
with an RGB
value and optional
alpha channel.
<color
name="red">
#ff0000</color>
Defines different
customization
based on the
physical device
density of the
screen
The text strings for
the application are
stored here.
<string
name="app_name
">Test</string>
Here we
specify the
format and the
look for the
user interface
(UI).
The styles can
be differently
applied to:
1) Views
2) Activities
3) The
application
itself
dimens.xml dimens.xml
(w820dp)
Gradle scripts
(module)
build.gradle
(project)
build.gradle
(module)
settings.gradle
gradle.
properties
proguard-rules.pro
local.
properties
This
is
the
top-level build
file. The
version
for the
G
radle
plugin
for android
is
specified
here.
classpath
'com
.android.tools.
build:gradle:2.0.0'
Each
m
odule
has
a
separate
build.gradle
file
with
pre-defined
values/settings
ProGuard is a free Java
class file that shrinks,
optimizes, obfuscates,
and preverifies. It detects
and removes unused
classes, fields, methods,
and attributes. It
optimizes bytecode and
removes unused
instructions.
Specifies the directory
where the SDK is
located
Includes the
modules the
application
consists of
Android Studio 2.0:
default project structure
Vyara Georgieva
viara.georgieva.g@gmail.com

Android studio 2.0: default project structure

  • 1.
    Android Studio 2.0: defaultproject structure Created by: Vyara Georgieva
  • 2.
    Android Studio 2.0:default project structure See the mind map visualization
  • 3.
    Android Studio 2.0: defaultproject structure app (module) Gradle scripts (module) Gradle is the official build system for Android Studio. Its configuration is set in the files contained here. The application The application’s specification is defined here
  • 4.
    app (module) manifests java res Storesthe app’s manifest file The externalized app’s resources are stored in the different subdirectories of the project’s res directory The app’s source code is placed here
  • 5.
    manifests AndroidManifest.xml The application The AndroidManifest.xml filemust be in the root directory of the application. The information presented here is essential. It's a must, in order the app's code to run. Required elements: <manifest> <application> The application Required attributes: xmlns:android -> defines the Android namespace. It must always be set to: "http://schemas.a ndroid.com/apk/re s/android" package -> the unique package name for the application. One the app published, the package name cannot be changed. Theapplication The app's components are defined here. By default, some attributes (icon, label, theme) are set to default values <activity> The application Each of the app's activities must be described in the manifest via a separate <activity> element. Otherwise they would not be run.
  • 6.
    java main project directory androidTest test The application Thesource code for the whole application is contained here. The content of this module is to be built into .apk file and installed on a device. MainActivity ApplicationTest ExampleUnitTest Testing modulesThe applicationJUnit tests inserted here
  • 7.
    resdrawable layout mipmap values Here are stored resources"that can be drawn" (.jpg, .png, . 9.png, .gif) or XML files that can be compiled into a drawable resource subtype) Stores drawable files for different launcher icon densities. The launcher icon reference in the AndroidManifest.xml should be altered as well: android:icon="@mipmap/ ic_launcher" The XML files from here are compiled into screen layouts. Different layouts could be provided for different densities External resources for the application’s elements
  • 8.
    valuescolors.xml dimens.xml strings.xml styles.xml A setlist of colors provided. The color is specified with an RGB value and optional alpha channel. <color name="red"> #ff0000</color> Defines different customization based on the physical device density of the screen The text strings for the application are stored here. <string name="app_name ">Test</string> Here we specify the format and the look for the user interface (UI). The styles can be differently applied to: 1) Views 2) Activities 3) The application itself dimens.xml dimens.xml (w820dp)
  • 9.
    Gradle scripts (module) build.gradle (project) build.gradle (module) settings.gradle gradle. properties proguard-rules.pro local. properties This is the top-level build file.The version for the G radle plugin for android is specified here. classpath 'com .android.tools. build:gradle:2.0.0' Each m odule has a separate build.gradle file with pre-defined values/settings ProGuard is a free Java class file that shrinks, optimizes, obfuscates, and preverifies. It detects and removes unused classes, fields, methods, and attributes. It optimizes bytecode and removes unused instructions. Specifies the directory where the SDK is located Includes the modules the application consists of
  • 10.
    Android Studio 2.0: defaultproject structure Vyara Georgieva viara.georgieva.g@gmail.com