Probably u could have just told them to download "android bundle" from developer site..that could have saved a lot of their work
I prefer the users know exactly what they are installing anyway I will add it to the tut ASAP And XML stuff will be a complete new tutorial in the near futureDude a suggestion don't get angry you can just link to the ADT bundle instead of downloading SDK and Eclipse separately... By the way nice guide for starters.. :good: But you could have also included using XML stuff and not just the coding.. Just a suggestion.. After all they also need XML to master developing...
The toolbox : JDK
As I said quickly in the introduction, Android applications are developed in Java. You may already have some of the tools that I will present here if you ever developed in Java. Well, so much better! It is much less work for you.
A word about Java
One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to platform-specific machine code. Java bytecode instructions are analogous to machine code, but they are intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. End-users commonly use some special tools installed on their own machines.
These tools are included in the JDK. In addition, the JDK contains the JRE (so also the virtual machine), which is handy.
To summarize, there has two cases:
- You are a simple user of Java : you must have JRE.
- You are a developer : you need the JDK tools
Frequently asked question :
- Since I tried to put myself in Java, I may already have JDK installed ... How do I know if this is the case ?
We will make a very simple little test (or rather 2 ).
Start by opening a command prompt in Windows (Start -> Programs -> Accessories -> Command Prompt) or a terminal if you're on a Mac or GNU / Linux.
- To know if JRE is installed, type the following command:
Code:java -version
- To know if JDK is installed, type the following command:
Code:javac
In both cases, if the command is not recognized, is that you do not have the tool in question (JRE or JDK).
If you have only the JRE, install the JDK.
If you have nothing ... Install the JDK: p (the JRE is included anyway).
In short, now that you know where you stand with your Java environment, you can do (or not btw) the installation.
While all of these explanations were not necessarily required, it is still better to know what is installed, right ?
Installing the JDK
The installation of the JDK will be faster than his explanations, I promise
downloading
To start, go to this address.
Click the "Download JDK" button.
On the next page, accept the license agreement and click on the executable to download : jdk-7u51-windows-x64.exe in my case
installation
To start the installation, double-click the executable previously downloaded and let it guide you (or run it from a terminal).
And voilà ! Here is the first brick laid.
Hello when you said "To start, go to this address" there is no address to go to. Really looking forward to using this guide but need the link
I prefer the users know exactly what they are installing anyway I will add it to the tut ASAP And XML stuff will be a complete new tutorial in the near future
Thanks for all of you and enjoy :highfive:
I prefer the users know exactly what they are installing anyway I will add it to the tut ASAP And XML stuff will be a complete new tutorial in the near future
Thanks for all of you and enjoy :highfive:
XML tutorial would be very helpful....looking forward to it!!I prefer the users know exactly what they are installing anyway I will add it to the tut ASAP And XML stuff will be a complete new tutorial in the near future
Thanks for all of you and enjoy :highfive:
XML tutorial would be very helpful....looking forward to it!!
And great tutorial for starters:good:
Specific tools for Android : Android SDK
Download the Android SDK and decompression
To download the Android SDK, go here and choose the file depending on your system.
As you can see, this file is compressed (zip for Windows and Mac or tgz for GNU / Linux). Unzip it where you want on your hard drive.
package com.test.helloxda_university;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
TextView tv = new TextView(this);
import android.widget.TextView;
tv.setText("Hello XDA-university !");
setContentView(tv);
super.onCreate(savedInstanceState);
package com.test.helloxda_university;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello XDA-university !");
setContentView(tv);
}
}
java -version
javac
echo %PATH%
set PATH=%PATH%;"path to android sdk"
set PATH=%PATH%;C:\Android\android-sdk-windows