Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Ubuntu 11.04) - Page 3
5 Installing PhoneGapTo install PhoneGap, open Firefox and go to https://github.com/phonegap/phonegap-android. Click on the Downloads button: Select Download .tar.gz from the overlay that comes up: In the Firefox download dialogue, please choose Save File: After the download has finished, go to the directory where the download has been saved (e.g. ~/Downloads/): cd ~/Downloads/ Take a look at the directory's contents to learn how the PhoneGap download is named: ls -l falko@falko-virtual-machine:~/Downloads$ ls -l As you see, in my case it is named phonegap-phonegap-android-0.9.5.1-15-g939754e.tar.gz. Now lets uncompress the file: tar xvfz phonegap-phonegap-android-0.9.5.1-15-g939754e.tar.gz In my case this creates the directory phonegap-phonegap-android-939754e inside the Downloads directory. I want to move that directory to my home directory and rename it to phonegap-phonegap-android: mv phonegap-phonegap-android-939754e ~/phonegap-phonegap-android We must add the bin directory inside $HOME/phonegap-phonegap-android to our PATH variable, therefore we edit ~/.profile again: cd ~ Replace the previously added PATH variable with this one:
To make the change effective, run: export PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$HOME/phonegap-phonegap-android/bin:$PATH" Now we are finished with setting up our Android development environment; finally we can start doing things with it!
6 Starting An Android EmulatorThe Android SDK comes with an emulator so that you can test your apps in the emulator instead of on a real Android device. To create an emulator, we first need to know which Android versions (targets) are available: android list targets falko@falko-virtual-machine:~$ android list targets I will now create an emulator called mySim for Android 2.3.3 (id 5 or android-10): android create avd -n mySim -t android-10 falko@falko-virtual-machine:~$ android create avd -n mySim -t android-10 To start the emulator, run: emulator -avd mySim -scale 0.75 It can take a few minutes until the emulator is up and running, but then it should look as follows:
|







Recent comments
10 hours 31 min ago
15 hours 36 min ago
20 hours 1 min ago
21 hours 50 min ago
1 day 12 hours ago
1 day 12 hours ago
1 day 17 hours ago
1 day 23 hours ago
2 days 34 min ago
2 days 1 hour ago