Friday 4 July 2014

Added a header and a button that does ... nothing.  
Using the "design" view, it looks very much like good ol visual programming.  I can specify a method to execute upon click for the button.  I didn't create the method, though.  So, fired up the VM and clicked the button - and, as expected, a NoSuchMethod exception was thrown.  Good.  That's what I expected.

And that's enough for today. 


SUCCESSSS!

Had to re-create the project, but specify v4.0.  Most likely because the VM I created was v4.0 as well.
Makes sense.

Yeesh.

2 + hours to get to this point - and zero of that 2 hours was coding.

ARRGGGHHH

I restart the VM.  Looks good!
Try to run the application on it ...

and I get this message:

DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.gary.myapplication"
pkg: /data/local/tmp/com.example.gary.myapplication
Failure [INSTALL_FAILED_OLDER_SDK]


This is seriously cheesing me off 
Project location.  Fixed.
Created and started a new Android VM. Running!

Attempting to run project on Android VM ... fail.

VM seems to have hung.  Kill VM and try again.

The run time booted after like ... 10 minutes.
It was pretty cool - there was an android device (Nexus?) running on my desktop in its own window.

BUT I couldn't run my app because ... no Android SDK was selected.  So when I installed the packages containing the run-time I foobared my environment, apparently.

I've quit IntelliJ, deleted the project, and restarted IntelliJ to create a fresh project.  Hopefully, the Android SDK will be selected properly.




Package installed.  Run time created.  I have a running emulated Android image...

...but installing the packages broke something else.  The IDE is now complaining that "No Android SDK found.  Please configure an Android SDK".

One step forward.  One step back.

All I want to fucking do is get my Hello World app running.

Still haven't got anywhere.

Turns out the "all-in-one" installer package for Android Studio isn't exactly all in one.  I still have to go through the "SDK Manager" to download a few additional packages - including an actual run-time environment.

The tutorial I am following (which was just written on June 20th - about two weeks ago!) doesn't mention this at all!  (http://www.i-programmer.info/programming/android/5887-android-adventures-getting-started-with-android-studio.html?start=2)

http://developer.android.com/sdk/installing/adding-packages.html

I'm downloading packages now - but I'm not sure which packages I should be downloading.  I just selected a bunch.  Hopefully I'll be able to get a freaking run-time!


Argh.

Ok, so IntelliJ seems nice - creating a new project automatically creates a pretty deep looking nested source structure - as well as a JSP-like template.  There's an on-screen image of a phone which theoretically shows real time changes.

The default new project creates a "Hello World" app - but I can't for the life of me, run the damn thing.  Under the "Run" options I can apparently either target my phone (no thanks) or create an emulated device.  I want this emulated device - but my understanding on how to create one is limited.  And there isn't much help.  So much for figuring things out on my own.

I've found an online tutorial here (http://www.i-programmer.info/programming/android/5887-android-adventures-getting-started-with-android-studio.html).  Let's see if that helps.
I stand corrected; it's Android Studio is built on IntelliJ, not Netbeans.
I'd better not receive a bill for this down the line.

Incidentally, this is also my first time using blogspot.

I didn't know that I had an account - I guess I get one for free because of my gmail account.   To be honest, it's a little disconcerting that I have an account created that I didn't sign up for.

Android Studio is being install.  Let's see how long before I have "Hello World" running on my phone!

So, it looks like I'm starting to explore android development.

I've just installed the beta of "Android Studio" - which is apparently NetBeans.  Now I gotta install the Java SDK.

Not a huge fan of this.  My development machine is also my home machine, and given the three zillion security holes (that remain UNPATCHED) which we hear about on a regular basis, I'm antsy about installing it.

I'll bite for now, but I'm probably going to have to invest in a standalone development machine at some point.

Why am I doing this?  Passing interest, mostly.  I've been meaning to break into android development for a while now.  Not that I have any great plans to become a paid developer - but it's neat to take a look.  Plus, it'll be a good learning experience.   How quickly can I learn a new development eco-system?