Wednesday, April 18, 2018

Android Development: Day 1 - I Don't Complain About Xcode Much, but Now I'll Never Complain About Xcode Again

I’ve been doing a bit of Android development here and there for the last couple years but today is the day I started digging in to really lay down some code.
Since I’d experimented, I opened an Android Studio 2.2 era project to use on Android Studio 3.0.1, the latest and greatest as of this writing.
Here are my notes on the experience:

The Good

  • I got everything updated and using the minSdkVersion
  • Realized I was using sdkVersion 26 (Android 8) RC1 libraries in the project, which is not what you want

The Bad

  • You have to update so many, to many, things
    • Android Studio
    • SDK Platforms
    • SDK Tools
    • Gradle
    • Kotlin
  • Any update can fail on my corporate network because they come from a variety of Internet repositories:
    • Google
    • Maven
    • JCenter
  • Android Studio and/or the behind the scenes command line tools have a hard time remembering or using corporate proxy server settings
  • Gradle does not gracefully recover from stalled or blocked downloads, it will happily spin seemingly forever
  • Changing the minSdkVersion (resetting from Android 4.4 to 23, aka Android 6) restarts most of the above
  • Android Plugin for Gradle 3.0.0 deprecated a whole bunch of stuff that I was getting warnied on with every build:
  • Gradle warnings
    •  I had a “+” in a library import (build.gradle) path to mean version 26 or higher.
      • Again an easy fix, but why not a migrator? This was in the old template.
    • Was importing an 1.0.0 of the constraint-layout library when 1.1.0 was available
      • Again an easy fix, but because of the network issues, this blocked forever
  • Android Studio keyboard shortcuts are garbage
    • Building & Running Should be ⌘B and ⌘R respectively, not ⌘F9 and ⌃R
    • No Keymap for Xcode when there are one for Emacs, Visual Studio, Eclipse, NetBeans and JBuilder just feels passive aggressive

The Ugly

  • Gradle just stopped building and I had to go delete some directories manually
  • Because of the aforementioned network issues, all this took around 1/2 day 😭