Click here to Skip to main content
13,501,976 members
Click here to Skip to main content
Add your own
alternative version


36 bookmarked
Posted 23 Apr 2013

Creating Android Apps using AIDE

, 23 Apr 2013
Rate this:
Please Sign up or sign in to vote.
This article demonstrates creating Android apps on device using AIDE.
Sample Image - maximum width is 600 pixels


The most common problem faced by people new to Android is setting up the Android environment. Still more difficult is the process of offline Android installation. For large applications, you still require setting up the Android environment on a PC along with the Eclipse IDE, but for smaller and simple applications you can use AIDE, which runs directly on your Android phone or tablet and allows you to compile your Android app without leaving your device. Also, AIDE is fully compatible with Eclipse.

AIDE is not just an editor. It comes with some very cool features like code completion, syntax highlighting, code refactoring, formatting and compilation.

AIDE can be freely downloaded from the Android Market Place.

To demonstrate the use of AIDE, I have developed an Android app which takes a user name as input and displays a welcome message. I have used the Android 4.0 Rc2 emulator (Android x86) running on VMware Player to test AIDE.


After starting AIDE on your device, the following screen appears which accepts the location and name of your app.

After clicking the Create button, the following screen is displayed which shows the files of your project in explorer style in the lower frame and allows you to edit files in the upper frame.

After completing coding, you can compile your project using the Run command from the menu as follows:

If the compilation is successful, you get the following screen to install your newly compiled app:

After installation, the app is displayed in the list of installed apps as follows:

Following is the output of the program:

Using the Code

Since the main intention of my article is to explain the use of the AIDE IDE and not Android Programming, I have deliberately created a simple application so that the reader remains focused on using the IDE.

Following is the code of the res/layout/main.xml file which defines the graphical interface of the application:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""



    android:orientation="vertical" >




        android:text="Enter your name: " />


        android:id="@+id/txtName" />


        android:id="@+id/btnOk" />
        android:text="OK" />


        android:id="@+id/btnCancel" />
        android:text="Cancel" />

The above code creates a linear layout with a vertical orientation. The layout consists of a TextView to display the static text "Enter your name: ". An EditText is used to accept input from the user. The OK and Cancel buttons are created to either process the input or clear the EditView contents.

Following is the code for the main Activity of the application (src/com/azim/

package com.azim;

import android.os.*;
import android.view.*;
import android.widget.*;

public class MainActivity extends Activity implements View.OnClickListener
   EditText txtName;
   Button btnOk,btnCancel;
   /** Called when the activity is first created. */
   public void onCreate(Bundle savedInstanceState)
	/* Referencing controls */
	/* Registering the onClick event of the buttons */
   public void onClick(View view)
	/* Display Welcome message */
          Builder builder=new Builder(this);
          builder.setTitle("Welcome to Android");
          builder.setMessage("Hello "+txtName.getText()+"!!!");
	/* Clear the EditText */

The above code gets references of the controls from the main.xml file and defines the event handler function for the click events of the buttons.

Points of Interest

The main advantage of the AIDE IDE is that it allows you to quickly create an Android application on your device without the hassle of setting up the Android environment on your PC and deploying it later to your device.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Azim Zahir
Instructor / Trainer NIIT, India
India India
I am a trainer by profession. Currently I am working with NIIT (Mumbai, India) as a Senior Faculty. I enjoy programming as a hobby. My favorite technologies are Flash, Flex and Silverlight.

Of late I have developed keen interest in WPF and Windows Mobile programming.

Apart from computers, my favorite pastime is bicycling.

You may also be interested in...


Comments and Discussions

Questionazim Pin
Member 125604631-Jun-16 17:03
memberMember 125604631-Jun-16 17:03 
QuestionGreat Example Pin
L eveni8-Jun-15 4:45
memberL eveni8-Jun-15 4:45 
AnswerRe: Great Example Pin
Azim Zahir17-Jun-15 3:13
mvpAzim Zahir17-Jun-15 3:13 
Questioni found errors .But i types all thing correct Pin
Member 115850936-Apr-15 9:43
memberMember 115850936-Apr-15 9:43 
Bugapplication has stopped unexpectedly Pin
Member 1045392813-Jan-15 19:40
memberMember 1045392813-Jan-15 19:40 
QuestionApp says there's errors Pin
Member 1081578113-May-14 5:45
memberMember 1081578113-May-14 5:45 
AnswerRe: App says there's errors Pin
Azim Zahir23-May-14 21:28
memberAzim Zahir23-May-14 21:28 
QuestionMy App hast stopped Pin
RezaSoufi5-Apr-14 8:27
memberRezaSoufi5-Apr-14 8:27 
QuestionCppDroid - C/C++ for Android Pin
Anton Smirnov11-Feb-14 4:04
memberAnton Smirnov11-Feb-14 4:04 
QuestionThx Pin
jow88s20-Nov-13 0:24
memberjow88s20-Nov-13 0:24 
AnswerRe: Thx Pin
Azim Zahir20-Nov-13 16:06
memberAzim Zahir20-Nov-13 16:06 
QuestionAIDE Pin
TonyS19685-Oct-13 3:08
memberTonyS19685-Oct-13 3:08 
GeneralMy vote of 5 Pin
Dineshshp21-Aug-13 19:17
memberDineshshp21-Aug-13 19:17 
GeneralRe: My vote of 5 Pin
Azim Zahir25-Aug-13 19:34
memberAzim Zahir25-Aug-13 19:34 
GeneralMy vote of 1 Pin
thefiloe16-May-13 23:46
memberthefiloe16-May-13 23:46 
GeneralRe: My vote of 1 Pin
Richard MacCutchan17-May-13 2:24
mvpRichard MacCutchan17-May-13 2:24 
GeneralMy vote of 5 Pin
Mihai MOGA10-May-13 18:34
memberMihai MOGA10-May-13 18:34 
GeneralRe: My vote of 5 Pin
Azim Zahir10-May-13 19:45
memberAzim Zahir10-May-13 19:45 
Questionthanks Pin
TheCardinal26-Apr-13 23:36
memberTheCardinal26-Apr-13 23:36 
AnswerRe: thanks Pin
Azim Zahir29-Apr-13 16:44
memberAzim Zahir29-Apr-13 16:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180417.1 | Last Updated 23 Apr 2013
Article Copyright 2013 by Azim Zahir
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid