This write-up covers the installation steps listed but not expanded on at the top of Apache Cordova API Documentation: Getting Started with Android.
To get started using Cordova on Gentoo we must first install Eclipse:
# emerge eclipse-sdk --ask * IMPORTANT: 9 news items need reading for repository 'gentoo'. * Use eselect news to read news items. These are the packages that would be merged, in order: Calculating dependencies... done! !!! All ebuilds that could satisfy "eclipse-sdk" have been masked. !!! One of the following masked packages is required to complete your request: - dev-util/eclipse-sdk-3.5.1-r1::gentoo (masked by: package.mask) /usr/portage/profiles/package.mask: # Ralph Sennhauser <firstname.lastname@example.org> (18 Jul 2012) # Unmaintained, multiple vulnarabilities. #351626 # A more recent source build maintained by the community is available in the # seden overlay. A more recent binary is available in the java-overlay.
Which is not going to be as easy as I had hoped. Emerge layman:
# emerge layman --ask These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] app-portage/layman-1.4.2-r3 USE="-bazaar -cvs -darcs -git -mercurial -subversion -test"
Once layman has been installed add the following to your make.conf:
Java-overlay uses subversion and seden uses git; you may also want to enable the mercurial USE flag if you plan on using other overlays. We’re going to use the java-overlay since when it comes to java binary and source-compiled doesn’t really make a difference (other than a lot of time).
# layman -a java-overlay ...
You may need to add eclipse-sdk-bin to package.keywords before it can be emerged:
# echo "dev-util/eclipse-sdk-bin" >> /etc/portage/package.keywords
Now install the package:
# emerge eclipse-sdk-bin
Now we need to install the :
$ wget http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz $ tar xvf android-sdk_r20.0.3-linux.tgz $ android-sdk-linux/tools/android
Running “android” from the command line in the tools directory will bring up the Android SDK Manager in X windows. Select any additional packages you would like to install and hit the Install button.
Now we’ll download the latest version of the Android Development Tools plugin for eclipse at http://developer.android.com/tools/sdk/eclipse-adt.html. Start eclipse:
Now follow the installation guide at http://developer.android.com/sdk/installing/installing-adt.html:
After restarting Eclipse you will be presented with the Welcome to Android Development dialogue, install the new SDK, and optionally 2.2. You are now ready to proceed with the rest of the Getting Started guide.