Wednesday 11 March 2015

How to make an Android app? Install the Development Environment

I had the idea I want to make an app, a quiz app. I like playing on quiz apps on my phone as I feel it improve my memory and knowledge.

I wonder how you go about it? I thought I need to make sure that the idea I have isn't already available but not necessarily. I am just curious how to do it, so maybe I need to search for that and see if it is possible to teach myself, in incremental steps. I want to see if it is possible with some technical competence, but no previous experience to teach myself how to do it.

So Google "How to make an android app" and top of the list is https://developer.android.com/training/basics/firstapp/index.html

I had to download Android Studio. Installing instructions are here:
https://developer.android.com/sdk/installing/index.html?pkg=studio

Terms I don't know:
IDE = Integrated Development Environment
SDK tools = Software Development Kit tools
Android APIs = Application Programming Interface "a set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service."

"open a terminal" = in Windows this means open Command Prompt - I have Windows 8 - I googled "how to open a terminal in Windows 8"
http://pcsupport.about.com/od/windows-8/a/command-prompt-windows-8.htm
But that is not what it meant? As the Windows terminal doesn't recognise the suggested syntax to test the version of JDK installed. Probably relates to Linux?

This bit didn't make any sense to me:
"Before you set up Android Studio, be sure you have installed JDK 6 or higher (the JRE alone is not sufficient)—JDK 7 is required when developing for Android 5.0 and higher. To check if you have JDK installed (and which version), open a terminal and type javac -version. If the JDK is not available or the version is lower than 6, go download JDK"

JDK = Java Development Kit "a program development environment for writing Java applets and applications".

When I came to install it said that could not detect JDK. Message box has a link to install it. It took ages where it appeared that nothing was happening before this message came up.

Downloaded http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

There was a note on the Java download page that said "The April 2015 CPU release will be the last Oracle JDK 7 publicly available update." So what will happen after that? Don't get diverted...

Installed JDK7 then clicked back on Android Studio set up.

On my computer I have 2 Program Files folders - one has (x86). I downloaded the JDK 68 version, did I need the 86?

Example folder C:\Program Files\Java\jdk1.7.0_21. My folder C:\Program Files\Java\jdk1.7.0_75
I put it in manually into the Android Studio install and it didn't seem to work. Cancelled the install.
Ran the install exe again and it worked OK without needing to put in the path, so the install found the right place itself.

Took 2 hours to get to this point.