Android Development Environment From Command Line in 4 Easy Steps

Posted by badjography | Posted in How to, Mobile, Scriplets, ubuntu | Posted on 17-10-2011

2

I recently got interested in Android development and wanting to learn (and if permits, a career shift! :D ) this awesome mobile programming.

If you look around the internet, most of the references that you will find there are mostly about Android Development from Eclipse IDE and it is also the IDE of choice by Android Developers see here. As for me, I want it somewhat "from scratch" that way I'll learn how an Android Application execute.

Android Developers provided a Developers Guide when Building and Running an Android Application from Command Line, but for a newbie like me with roughly 5% Android development knowledge, it is too advance for me to understand those. That's why I decided to do a step-by-step setting up an android development environment in 4 easy steps.

In this article, I'll show you how to setup an android development environment in 4 easy steps when building and running an Android Application from command line. From creating a project to building a .apk in debug mode (yes, no release mode for now :) ). Here's how:

1. Creating a project -this step can be seen in Android Developer's Guide:

badjo@kungfuu:~$ android create project \
> --target 1 \
> --name MyAndroidApp \
> --path ./MyAndroidAppProject \
> --activity MyAndroidAppActivity \
> --package com.example.myandroid

2. Copy the platform-tools and tools folders from Android SDK folder and paste it in your application root.

3. Execute ant debug.

badjo@kungfuu:~/MyAndroidAppProject$ ant debug

4. Install it on your virtual phone using adb. You can find the adb command on your ..Applicationfolder/platform-tools/.

badjo@kungfuu:~/MyAndroidAppProject/platform-tools$ ./adb -d install \
> --../bin/MyAndroidApp-debug.apk

That's it, from there you can start your Android development 4 easy steps.

Thanks for reading, for feedback and missed steps please don't hesitate to drop me a message :) .

Comments (2)

I just subscribed to your rss feed after reading this article! Can you put up more about the topic in future posts?

sure! been busy lately and got no time to write something. thanks!

Write a comment

Security Code: