$30 off During Our Annual Pro Sale. View Details »

Android Studio

Paresh Mayani
September 28, 2013

Android Studio

Introduction to Android studio, this was presented at GDG DevFest Kathmandu (Nepal).

Paresh Mayani

September 28, 2013
Tweet

More Decks by Paresh Mayani

Other Decks in Technology

Transcript

  1. Android Studio

    View Slide

  2. Paresh Mayani
    Android Developer
    @pareshmayani
    www.TechnoTalkative.com

    View Slide

  3. Hello World
    16th May 2013
    During Google I/O
    2013
    @pareshmayani

    View Slide

  4. @pareshmayani

    View Slide

  5. What is Android Studio?
    @pareshmayani

    View Slide

  6. @pareshmayani

    View Slide

  7. Android focused IDE
    @pareshmayani

    View Slide

  8. Android focused IDE
    (designed specifically for Android
    development)
    @pareshmayani

    View Slide

  9. Similar to Eclipse with the ADT Plug-in
    @pareshmayani

    View Slide

  10. Contains All the Android SDK Tools to
    design, test, debug, and profile your app
    @pareshmayani

    View Slide

  11. New Android development
    environment
    http://www.jetbrains.com/idea/

    View Slide

  12. New Android development
    environment based on
    http://www.jetbrains.com/idea/
    Is based on

    View Slide

  13. New Android development
    environment based on IntelliJ IDEA
    http://www.jetbrains.com/idea/
    Is based on

    View Slide

  14. Why a New IDE?
    @pareshmayani

    View Slide

  15. Eclipse for Android….huh !!
    @pareshmayani

    View Slide

  16. What is the difference between
    IntelliJ Idea and Android Studio?
    @pareshmayani

    View Slide

  17. 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

    View Slide

  18. IntelliJ Idea and Android Studio? FAQ
    http://blog.jetbrains.com/idea/2013/05/intellij-idea-and-
    android-studio-faq/
    @pareshmayani

    View Slide

  19. Let’s Download
    @pareshmayani

    View Slide

  20. Let’s Download
    http://developer.android.com/sdk/installing/studio.html
    @pareshmayani

    View Slide

  21. Features of Android Studio
    @pareshmayani

    View Slide

  22. • Powerful code editing (smart editing, code
    refactoring)
    @pareshmayani

    View Slide

  23. • Powerful code editing (smart editing, code
    refactoring)
    • Rich layout Editor
    @pareshmayani

    View Slide

  24. • Powerful code editing (smart editing, code
    refactoring)
    • Rich layout Editor
    • Gradle-based build support
    @pareshmayani

    View Slide

  25. • Powerful code editing (smart editing, code
    refactoring)
    • Rich layout Editor
    • Gradle-based build support
    • Maven support
    @pareshmayani

    View Slide

  26. • Powerful code editing (smart editing, code
    refactoring)
    • Rich layout Editor
    • Gradle-based build support
    • Maven support
    • Template based wizards
    @pareshmayani

    View Slide

  27. • Powerful code editing (smart editing, code
    refactoring)
    • Rich layout Editor
    • Gradle-based build support
    • Maven support
    • Template based wizards
    • Lint tool analysis
    @pareshmayani

    View Slide

  28. • 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

    View Slide

  29. Gradle
    @pareshmayani

    View Slide

  30. Gradle - The New Build System
    @pareshmayani

    View Slide

  31. • Gradle is an advanced build management
    system based on Groovy
    @pareshmayani

    View Slide

  32. • Gradle is an advanced build management
    system based on Groovy
    • Its an Open source build system
    @pareshmayani

    View Slide

  33. • Gradle is an advanced build management
    system based on Groovy
    • Its an Open source build system
    • Combines the power of Ant and Maven
    @pareshmayani

    View Slide

  34. Features & Benefits of Gradle
    @pareshmayani

    View Slide

  35. • Dependency Management (Flexible
    approach to dependency management that can
    reuse existing maven repositories or reference
    local JARs)
    @pareshmayani

    View Slide

  36. • A single build system (Gradle is the
    authoritative build across the IDE and the
    command-line.)
    @pareshmayani

    View Slide

  37. • Product Flavors (Free & Paid version)
    • Build Variants (Play store OR Amazon OR Any
    other store)
    • Build Type (Debug, QA, Release)
    @pareshmayani

    View Slide

  38. • Binary Bundles for Libaries (.aar) (Gradle
    supports the new .aar binary bundle format for the
    library projects)
    @pareshmayani

    View Slide

  39. Dependency Management
    @pareshmayani

    View Slide

  40. Ant
    Dependency
    Management
    Compiled
    with
    ANDROID APK
    All source & JARs are
    Combined into APK
    Source code files &
    Libs are stored together
    @pareshmayani

    View Slide

  41. 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

    View Slide

  42. 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

    View Slide

  43. Migrating from Eclipse
    http://developer.android.com/sdk/installing/migrate.html
    @pareshmayani

    View Slide

  44. Awesome stuffs Inside
    @pareshmayani

    View Slide

  45. Dracula “Darcula” Theme
    File > Settings > IDE Settings > Appearance >
    Theme: Darcula
    @pareshmayani

    View Slide

  46. Preview All Screens

    View Slide

  47. Device framed screen capture
    New things:
    1. Frame Capture
    2. Drop Shadow
    3. Screen Glare
    @pareshmayani

    View Slide

  48. Color Preview
    Live Preview of all
    the color values
    @pareshmayani

    View Slide

  49. Color Preview – Activity class
    @pareshmayani

    View Slide

  50. 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

    View Slide

  51. Alert - Potential Null Pointer Exception
    Alert: There is potential Null pointer exception
    @pareshmayani

    View Slide

  52. Oops – Rendering Problems
    Shows you Rendering Problem while designing
    layout
    @pareshmayani

    View Slide

  53. Create Landscape variation
    Option to create variant layouts
    in single click
    @pareshmayani

    View Slide

  54. Keyboard Shortcuts
    @pareshmayani

    View Slide

  55. Go to file
    CTRL + SHIFT + N
    @pareshmayani

    View Slide

  56. Go to class
    CTRL + N
    @pareshmayani

    View Slide

  57. Renaming
    SHIFT + F6
    @pareshmayani

    View Slide

  58. Get documentation
    To quickly see the documentation for the class
    or method used at the editor's caret, press
    Ctrl+Q
    @pareshmayani

    View Slide

  59. Which IDE to use?
    @pareshmayani

    View Slide

  60. All the Keyboard Shortcuts
    • Help => Default Keymap Reference
    (To view all the keyboard shotcuts)
    @pareshmayani

    View Slide

  61. No
    It’s EARLY ACCESS PREVIEW
    Should wait until Beta
    Should I use Android Studio?
    @pareshmayani

    View Slide

  62. 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

    View Slide


  63. Paresh Mayani
    Manager, GDG Ahmedabad
    Android Developer
    [email protected]
    @pareshmayani
    www.TechnoTalkative.com

    View Slide