Hello World
16th May 2013
During Google I/O
2013
@pareshmayani
Slide 4
Slide 4 text
@pareshmayani
Slide 5
Slide 5 text
What is Android Studio?
@pareshmayani
Slide 6
Slide 6 text
@pareshmayani
Slide 7
Slide 7 text
Android focused IDE
@pareshmayani
Slide 8
Slide 8 text
Android focused IDE
(designed specifically for Android
development)
@pareshmayani
Slide 9
Slide 9 text
Similar to Eclipse with the ADT Plug-in
@pareshmayani
Slide 10
Slide 10 text
Contains All the Android SDK Tools to
design, test, debug, and profile your app
@pareshmayani
Slide 11
Slide 11 text
New Android development
environment
http://www.jetbrains.com/idea/
Slide 12
Slide 12 text
New Android development
environment based on
http://www.jetbrains.com/idea/
Is based on
Slide 13
Slide 13 text
New Android development
environment based on IntelliJ IDEA
http://www.jetbrains.com/idea/
Is based on
Slide 14
Slide 14 text
Why a New IDE?
@pareshmayani
Slide 15
Slide 15 text
Eclipse for Android….huh !!
@pareshmayani
Slide 16
Slide 16 text
What is the difference between
IntelliJ Idea and Android Studio?
@pareshmayani
Slide 17
Slide 17 text
Nothing
If you use IntelliJ…
– Keep using it.
– IntelliJ 13 will have the same stuff
– EAP of IntellJ Idea 13 includes all the new stuffs
If Not…
– Give Android Studio a try
@pareshmayani
Slide 18
Slide 18 text
IntelliJ Idea and Android Studio? FAQ
http://blog.jetbrains.com/idea/2013/05/intellij-idea-and-
android-studio-faq/
@pareshmayani
• Powerful code editing (smart editing, code
refactoring)
• Rich layout Editor
• Gradle-based build support
• Maven support
@pareshmayani
Slide 26
Slide 26 text
• Powerful code editing (smart editing, code
refactoring)
• Rich layout Editor
• Gradle-based build support
• Maven support
• Template based wizards
@pareshmayani
Slide 27
Slide 27 text
• Powerful code editing (smart editing, code
refactoring)
• Rich layout Editor
• Gradle-based build support
• Maven support
• Template based wizards
• Lint tool analysis
@pareshmayani
Slide 28
Slide 28 text
• Powerful code editing (smart editing, code
refactoring)
• Rich layout Editor
• Gradle-based build support
• Maven support
• Template based wizards
• Lint tool analysis
• Easy access to Google service (e.g GCM)
@pareshmayani
Slide 29
Slide 29 text
Gradle
@pareshmayani
Slide 30
Slide 30 text
Gradle - The New Build System
@pareshmayani
Slide 31
Slide 31 text
• Gradle is an advanced build management
system based on Groovy
@pareshmayani
Slide 32
Slide 32 text
• Gradle is an advanced build management
system based on Groovy
• Its an Open source build system
@pareshmayani
Slide 33
Slide 33 text
• Gradle is an advanced build management
system based on Groovy
• Its an Open source build system
• Combines the power of Ant and Maven
@pareshmayani
Slide 34
Slide 34 text
Features & Benefits of Gradle
@pareshmayani
Slide 35
Slide 35 text
• Dependency Management (Flexible
approach to dependency management that can
reuse existing maven repositories or reference
local JARs)
@pareshmayani
Slide 36
Slide 36 text
• A single build system (Gradle is the
authoritative build across the IDE and the
command-line.)
@pareshmayani
Slide 37
Slide 37 text
• Product Flavors (Free & Paid version)
• Build Variants (Play store OR Amazon OR Any
other store)
• Build Type (Debug, QA, Release)
@pareshmayani
Slide 38
Slide 38 text
• Binary Bundles for Libaries (.aar) (Gradle
supports the new .aar binary bundle format for the
library projects)
@pareshmayani
Slide 39
Slide 39 text
Dependency Management
@pareshmayani
Slide 40
Slide 40 text
Ant
Dependency
Management
Compiled
with
ANDROID APK
All source & JARs are
Combined into APK
Source code files &
Libs are stored together
@pareshmayani
Slide 41
Slide 41 text
Maven Builds
Dependency
Management
Compiled
with
ANDROID APK
All source & JARs are
Combined into APK
Maven
Central
Respository
Read pom.xml
Get dependencies
Source code files
@pareshmayani
Slide 42
Slide 42 text
Gradle Builds
Dependency
Management
Compiled
with
ANDROID APK
All source & JARs are Combined into APK
Maven
Central
Respository
Read gradle.build
Get dependencies
Local files
Project itself
Debug QA Release
Source code files
@pareshmayani
Slide 43
Slide 43 text
Migrating from Eclipse
http://developer.android.com/sdk/installing/migrate.html
@pareshmayani
Device framed screen capture
New things:
1. Frame Capture
2. Drop Shadow
3. Screen Glare
@pareshmayani
Slide 48
Slide 48 text
Color Preview
Live Preview of all
the color values
@pareshmayani
Slide 49
Slide 49 text
Color Preview – Activity class
@pareshmayani
Slide 50
Slide 50 text
Hard coded Strings
1. Settings > Editor > Code Folding > Android
String References
OR
2. Select String and right click on it and then go
to Folding > Collapse
OR
CTRL + Numpad ‘-’
@pareshmayani
Slide 51
Slide 51 text
Alert - Potential Null Pointer Exception
Alert: There is potential Null pointer exception
@pareshmayani
Slide 52
Slide 52 text
Oops – Rendering Problems
Shows you Rendering Problem while designing
layout
@pareshmayani
Slide 53
Slide 53 text
Create Landscape variation
Option to create variant layouts
in single click
@pareshmayani
Slide 54
Slide 54 text
Keyboard Shortcuts
@pareshmayani
Slide 55
Slide 55 text
Go to file
CTRL + SHIFT + N
@pareshmayani
Slide 56
Slide 56 text
Go to class
CTRL + N
@pareshmayani
Slide 57
Slide 57 text
Renaming
SHIFT + F6
@pareshmayani
Slide 58
Slide 58 text
Get documentation
To quickly see the documentation for the class
or method used at the editor's caret, press
Ctrl+Q
@pareshmayani
Slide 59
Slide 59 text
Which IDE to use?
@pareshmayani
Slide 60
Slide 60 text
All the Keyboard Shortcuts
• Help => Default Keymap Reference
(To view all the keyboard shotcuts)
@pareshmayani
Slide 61
Slide 61 text
No
It’s EARLY ACCESS PREVIEW
Should wait until Beta
Should I use Android Studio?
@pareshmayani
Slide 62
Slide 62 text
Links
• Android Studio: An IDE built for Android => http://goo.gl/iHRvYF
• Google I/O 2013 - What's New in Android Developer Tools => http://goo.gl/VRCEIb
• DevBytes: Android Studio => http://goo.gl/28UB94
• https://speakerdeck.com/donnfelker/introduction-to-android-studio
• Google I/O 2013 - The New Android SDK Build System => http://goo.gl/N9e2Fq
@pareshmayani