Android Studio – useful notes (1)

Having worked for years with Eclipse (and some time with Netbeans), I have to admit that using Android Studio (based on InteliJ) I’m fining harder that what it should be. Where’s all my key shortcut combinations!

Whenever I use Netbeans, I use the Eclipse keymappings option in the settings, so I don’t have to remember any new key shortcuts. I’m not sure if Android Studio/IntelliJ has this option as well, but in the meantime, here’s some notes for useful things to remember.

Organize Imports (Eclipse: shift-Ctrl-O) / Optimize Imports: Ctrl-Opt-O

Jump to definition (Eclipse: F3) : Opt-Cmd-B

Fix error with popup suggestion: Opt-Return

 

Other useful Android development related posts:

http://stackoverflow.com/questions/17252870/how-to-show-compilation-errors-in-android-studio

http://stackoverflow.com/questions/2364811/how-do-i-write-outputs-to-the-log-in-android

 

Migrating Eclipse ADT Android project to Android Studio

It’s been a couple of years since I’ve done any Android development. In the meantime I was aware that Android Studio was coming along, but apparently now Eclipse and the ADT plugins are no longer supported, so time to migrate source from some existing apps I was working on to Android Studio.

First issue: remove paths from .classpath and project.properties files otherwise ADT library references are not resolved on import.

Next issue: “Unsupported Gradle DSL method found: ‘compile()’!” – luckily this issue and the solution is described exactly here. This is my first experience with Gradle too, so got some more learning to do 🙂

Game development for Android (attempt #3)

A while back (9 years it seems, see here) I had the urge to try and create a game in Java after having spent many years of Java development for business, but I’d never developed a game. It turned out OK (final version here), and along the way I abstracted a simple 2d game engine (here).

Inspired by one of the game development panels at Silicon Valley Comic Con last weekend, I’ve picked up a copy of  Android Game Development by Example by John Horton, and now off I go 😉 I’ll report back in a couple of weeks…