If you’ve ever been interested in Android development, Fedora is a great operating system to install on your computer – there are loads of developmental tools available for programmers of all types.
With a bit of effort, you can get a very nice Android development environment set up in Fedora (Heisenberg, the latest version, works wonderfully). You’ll be up and running in no time, so you can start making your creative ideas into real apps.
The first step is to download Eclipse, the best IDE for Android development. In Fedora, you can easily do this by running the command sudo
yum install @eclipse eclipse-jdt.
This will actually install the “Fedora Eclipse” package group which includes all necessary Eclipse packages as well as a few others that are related to Fedora development and Java support. Just let all this install, and you’re off to a good start. If you’re new to Eclipse, then don’t forget to check out the 8 most useful keyboard shortcuts for it.
Install Android Plugin
Once this completes, you’ll need to install the Android Plugin for Eclipse. To do this, open Eclipse and click on Help –> Install New Software. Then click Add, at the top right of that window. Type in Android Plugin for the name and https://dl-ssl.google.com/android/eclipse/ for the address.
Once this is done, click on the Available Software Sites hyperlink below the Add button, then highlight the Android Plugin source and click on Reload. Now exit this window, and choose Android Plugin from the “Work with” dropdown menu. Choose the developer tools option that you see here. Proceed to install these tools, accepting licenses agreements when asked.
You have the Android Plugin installed now, but you still need the SDK that the plugin connects to. The SDK is a big package of code that allows you to test out Android apps, and it also provides other useful tools (for a while, the only way to take screenshots was to use the SDK). You can download the Android SDK from here, and be sure to select the appropriate SDK for your architecture (32-bit or 64-bit).
This download is almost 200 mb, so give it a little time. Once it completes, unzip it to your home folder (so that the path reads /home/<user>/AndroidSDK). The last thing you need to do for the SDK is to open up your .bash_profile file (make sure that your file browser is showing hidden files, as all hidden files have filenames that start with a period), and add the following text to the bottom of the file:
# For SDK version r_08 and higher, also add this for adb:
What this code does is lets the SDK function correctly, by allowing those tools to be accessed by their name rather than a path – “abd” instead of “/home/<user>
Configure Your Android Virtual Device
Think you’re done? Not quite yet – you still have to create a virtual Android device that will emulate the app(s) you are developing. You can do this by opening a terminal, going into the sdk folder using the command
cd AndroidSDK/sdk, and then by running the command
tools/android. Here you’ll need to choose which version(s) of Android you’re targeting – remember that an older target would make the app more compatible, but a newer target will benefit from recent advancements made in Android. You’ll need to select the categories:
- SDK Platform Android 4.0 (replace 4.0 with all versions you’re interested in installing)
- Documentation for Android SDK
- Platform Tools
When installing, be sure to accept all licenses so everything actually installs. Once it completes, choose Tools –> Manage AVDs, and then click on New. Name it something, choose a device to emulate (the Nexus 4 is a good idea if you’re developing for phones), and choose all other options you’d like to have.
You’ve finally set everything up! You can now go to Eclipse and create a new Android project and start developing your next app. We have plenty of articles at MakeUseOf to on how to start learning Android development, now that you have a working development environment ready to go. Once you’re ready to test out some code, just hit the Run button and the emulator will appear with the app running! If it doesn’t appear at first, just give it some time – it took almost half a minute to appear for me, even though I have an SSD!
What Android development tips do you have for fellow beginners? Let us know in the comments, okay?