Hello everyone.
Before anything, It's necessary to be explained step by step how we can create a development environment in Android. There is several posts in about it in Internet, but as sometimes some people asks me about it, I've decided to create this post.
The programming to Android devices may be performed through programming languages as Java and Scala, and using tools like NetBeans, Eclipse, or even through command line.
In this post will be showed the most common approach, that is using Java programming language and the Eclipse framework
NOTE: For Android programming, using Java and Eclipse framework, is demanded a minimum knowledge in computer programming. If you don't meet these requirements, this post isn't appropriate to you.
The installation steps of the Android in your machine may be divided in several steps.
Step 1 - Download the Java SDK
Before anything, It's necessary to be explained step by step how we can create a development environment in Android. There is several posts in about it in Internet, but as sometimes some people asks me about it, I've decided to create this post.
The programming to Android devices may be performed through programming languages as Java and Scala, and using tools like NetBeans, Eclipse, or even through command line.
In this post will be showed the most common approach, that is using Java programming language and the Eclipse framework
NOTE: For Android programming, using Java and Eclipse framework, is demanded a minimum knowledge in computer programming. If you don't meet these requirements, this post isn't appropriate to you.
The installation steps of the Android in your machine may be divided in several steps.
Step 1 - Download the Java SDK
We can't forget that is mandatory to have the Java Development Kit (SDK). The download of this development package can be accomplished here.
Also, Java must be configured with it’s Enviroment Variables. If isn’t, follow this link.
For the download be done, it's necessary to accept the license agreement for the Java using. To accept, simply click on the button, as shown below.
Also, Java must be configured with it’s Enviroment Variables. If isn’t, follow this link.
For the download be done, it's necessary to accept the license agreement for the Java using. To accept, simply click on the button, as shown below.
This step is common to download this package for all operating systems, like Linux, Windows and Mac.
Now that we have the Java SDK installed on the computer, the next step is to download the Eclipse framework. This framework is an IDE (Integrated Development Environment), an integrated development environment for computer programs. Is in this environment that Android applications are created.
The download of this framework can be done here. This site automatically detects the operating system you are using, showing options for downloading this package. The package that we must download is shown below:
It must be downloaded the STANDARD version of Eclipse, and not others like EE Developers or C/C + + Developers.
This is the latest version of Eclipse, known as Eclipse Kepler. To download, just click the links beside the image above (in this case, for Windows). Then you will be redirected to a new site where the download will be performed.
The next step is to install the Android on Eclipse. The Eclipse is a program that requires no installation. Its downloaded content already contains everything we need to initialize it's execution. It is advisable to leave this content in a folder like C:/eclipse (for Windows), or /home/<user>/eclipse (in the case of Linux or Mac).
To open the Eclipse, just click the purple icon called "eclipse". Before Eclipse is open, it will ask you to be informed the "workspace" where you will place the projects that will be developed. In my case, I chose the path C:/workspace (for Windows) and /home/<user>/workspace (in the case of Linux or Mac).
Then, Eclipse will open, and what we'll have on the screen will be this:
Now we need to install the Android on Eclipse. For this, we must click on Help option from the menu bar, and then click Install New Software. After that, you should click "Add..." and give the name and the link of what we'll download on Eclipse.
The name I always use is "Android SDK", and the link (to be placed in the "Location:") is: https://dl-ssl.google.com/ android/eclipse/.
After that, we must confirm the next steps (all of them, even when it is required to restart Eclipse), and after 5 to 10 minutes, the new look of Eclipse will be this:
Now, there are a few new icons in Eclipse, including two icons that appear with the Android mascot, a sign that Android has been downloaded correctly on the machine.
Step 4 - Refresh the Android SDK Manager
Now that Android has already been installed, we need to update their packages to create applications for several existing versions of Android (1.5, 1.6, 2.1, 2.2, 2.3, 3.0, 3.1, 4.0, 4.1, 4.2, 4.3, and the latest 4.4).
To do so, just click on the icon that appears with the Android mascot above a white arrow. This icon will open the SDK Manager.
Now we just choose which versions of Android (API calls) we want to get to development. The wise choice is all. However, this step takes a long time. Get ready to wait for more than 1 hour.
With the SDK updated, it'll be available several examples (Samples) of Android source code, and also the special libraries of Google, such as Google Maps library.
-----
With these 4 steps, now we can start creating our first programs in Android. But that will be seen in an upcoming topic.
If someone has a question, suggestion or criticism, feel at ease.
Nenhum comentário:
Postar um comentário