Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Fedora 14) - 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@localhost Downloads]$ ls -l As you see, in my case it is named phonegap-phonegap-android-0.9.3-24-g9354b42.tar.gz. Now lets uncompress the file: tar xvfz phonegap-phonegap-android-0.9.3-24-g9354b42.tar.gz In my case this creates the directory phonegap-phonegap-android-9354b42 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-9354b42 ~/phonegap-phonegap-android We must add the bin directory inside $HOME/phonegap-phonegap-android to our PATH variable, therefore we edit ~/.bash_profile again: cd ~ Replace the previously modified PATH variable with this one:
To make the change effective, run: export PATH=$PATH:$HOME/bin:$HOME/android-sdk-linux_86/tools:$HOME/android-sdk-linux_86/platform-tools:$HOME/phonegap-phonegap-android/bin 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@localhost ~]$ android list targets I will now create an emulator called mySim for Android 2.2 (id 4 or android-8): android create avd -n mySim -t android-8 (The emulator for Android 2.3 seems to be buggy; the apps I built for 2.3 crashed immediately after starting them, while they run fine on 2.2; therefore I use Android 2.2 here.) [falko@localhost ~]$ android create avd -n mySim -t android-8 To start the emulator, run: emulator -avd mySim It can take a few minutes until the emulator is up and running, but then it should look as follows:
|







Recent comments
1 day 13 hours ago
1 day 16 hours ago
2 days 3 hours ago
2 days 6 hours ago
2 days 10 hours ago
2 days 17 hours ago
3 days 2 hours ago
3 days 4 hours ago
3 days 12 hours ago
3 days 13 hours ago