Chapter 2 - SDK Install and Initial Setup
Chapter 2 - SDK Install and Initial Setup
Today:
How to setup a machine to start developing Android
applications
An overview of an Android project
Some useful tools
Your first Android application
• Maybe on a real device!
2
Two options
3
Which one?
4
Android Studio
5
Where and how to get it
Go to http://developer.android.com/sdk/installing/studio.html
6
Basic requirements
7
SDK tools
Android tool
8
Your first Android application
9
Testing on the emulator
10
Creating an emulator
11
Did everything went fine?
12
Hello world, Android!
Anatomy of an application
Activity: what is started
View: what is seen
Intent: how to communicate with others
13
Application structure
14
build
Autogenerated files
No need to modify them
Some are autogenerated
Each project contains
Activities
Layouts
XML files
AndroidManifest.xml
15
src
17
How to test
Via an AVD
Fast, possible to have different resolutions, APIs
Not a real device
On a real device
You get exactly what is deployed
Must own a real device
So?
Test in on AVDs.
When you feel that the application is ready, go with a real device
18
How to deploy
19
ECLIPSE
SDK and initial setup: 3 step setup
21
INSIDE THE SDK
ADT PLUGIN FOR ECLIPSE
Project name
PROJECT CONTENTS
Project name
Src folder with java files
PROJECT CONTENTS
Project name
Src folder with java files
Auto-generated files
PROJECT CONTENTS
Project name
Src folder with java files
Auto-generated files
Android's base files
PROJECT CONTENTS
Project name
Src folder with java files
Auto-generated files
Android's base files
Compiled files
PROJECT CONTENTS
Project name
Src folder with java files
Auto-generated files
Android's base files
Compiled files
Resources files
PROJECT CONTENTS
Project name
Src folder with java files
Auto-generated files
Android's base files
Compiled files
Resources files
Android Manifest
HOW TO DEPLOY