Building Android without the migraine, using Android Studio, Gradle and Genymotion.
Cradle to the Gradle
Building Android Without the Migraine
Hello darkness, my old
R cannot be resolved to a type...
Fix project properties…
Egit says you have unresolved conflicts...
PC load letter… What the $#@! does that mean?
Eclipse, meet your maker
A UI for this millenium
Version control baked in.
And it works!
Doesn’t randomly freeze.
And it’s in beta!
Will still suck all your RAM.
But it tells you how much!
All the “great IDE features.”
And it’s not Eclipse!
OK, real talk on some features
Preview all screen sizes
Jump from Activity to its Layout
Jump from Layout to its Activity
Jump from Fragment to its Layout
Jump from Layout to its Fragment
It’s &%$*ing life changing
Some Useful commands:
Jump to File: ⌘⇧O
Jump to Class: ⌘O
Find All (Project): ⌘⇧F
...Hover and it’ll tell you
Now to the real cool stuff
Let’s talk dependency management
Maybe you did this?
Maybe you did this?
And what do we say?
No more carrying around dependencies!
All we need is a build.gradle file
The dayman cometh
So let’s talk build.gradle
AndroidManifest.xml gets stupid-er
Versioning / SDK moves to build.gradle
How many bloody DSL’s are there?
It’s just Groovy, baby.
...So enough of that.
Why should I make the switch?
Ever seen this?
Build [release] from command line
Take that, Eclipse
For you heavy readers:
Also makes collaborating easy.
Clone (or otherwise acquire) project source:
Just import build.gradle file
Also automagically sets up VCS and remotes
One last thing…
Poll: how long does this
normally take you?
Maybe you’re sick of always carrying one of these around
Walk towards the light...
Integrates right into Android Studio (plugin)
Make the switch. For Android. For Sanity.
Let me know if you need any help!
Android Studio: http://developer.android.com/sdk/installing/studio.html
Android Gradle: http://tools.android.com/tech-docs/new-build-system/user-guide
Versioning build.gradle: https://gist.github.com/rdallman/7314868
Find maven dependencies: http://gradleplease.appspot.com/
Link Summary (+goodies):