Initial Steps in Android Programming are following:
So we need to set environment variable named JAVA_HOME
Advanced system settings â†’ Advanced â†’ Environment Variables â†’ JAVA_HOME
and also change path:
After that, problems might appear. For example, one thing that can happened is that android studio doesn’t find Java development kit (JDK).
In that case, we must go into folder that path is something like:
and find jdk.table.xml file. This file should be changed as follows
<homePath value=”C:/Program Files/Java/jdk1.8.0_60″/>
Next important step is to verify if your mobile device fully communicate with Android studio, i.e. you must test Android Studio on a Physical Android device, Checking this is best by using adb logcat command. ADB is abbreviation for Android Debug Bridge. So find path for your adb.exe. It suppose to be something like this:
Two major commands for checking health of mobile device – PC communications are:
- adb devices
- adb logcat
If response on adb device command is unauthorized and on adb logcat is waiting for device, then you haven’t installed drivers of your mobile device to your Windows8.1. See figure bellow.
If this is the case, you MUST install driver for your mobile device on your Windows8.1, although you can access your mobile with windows explorer. This is because for accessing mobile device you can use universal USB driver, but this is not enough for programming the device in Android studio. Install your mobile device drivers first:
Once when driver is installed, you can start with programming.
So, in order to start with the pleasure of programming your mobile device in Android studio, you must test Android Studio on a physical android device, and also fix all problems with how to point to valid JDK.