Building Android SDK: Only one Android target being created - android

Edit: I know I can download the SDK easily, but I specifically want to build everything myself. I'm trying to understand the build process more.
I used repo to download the AOSP source. Multiple places guide me to build the SDK as follows:
$ cd $AOSP_ROOT
$ . build/envsetup.sh
$ lunch sdk-eng
$ make sdk
This works perfectly, I get a zip file with the SDK and the emulator works. However, the only Android target that is generated is the latest one e.g.
$ cd $SDK_ROOT/platforms
$ ls
android-4.0.4.0.4.0.4
is all I see. How can I get the other Android targets? Do I have to use repo to switch the branch of Android that I'm on, build the entire SDK and just copy out the appropriate target files? Is there some simpler way, like a different make target that would achieve this? Can I request that the SDK be built and that all targets be available? Should I just download a non-locally-compiled SDK and copy the targets to my SDK_ROOT/platforms?

You need to use repo tool to switch to the appropriate branch and build your SDK for this branch. I do not think that it is possible to build SDK for all branches simultaneously.

Related

There are not available platforms

Im using cocos2d-x version 12 and NDKrc12 and I have all the paths in my
.bash_profile set. But when I build for android and type:
cocos compile -p android
It displays a message "There are not available platforms" which can't be because I have the android SDK installed in the correct path what is wrong?
On the latest version of cocos2d-x for some odd reason you need to use the '-s' option like this:
cocos run -s /Users/me/myprojects/mygame -p android
Otherwise without '-s' it displays "there are not available platforms"
seems unnecessary when your in your project folder but I guess it is!
Run android on the command line, this will open the Android SDK manager. From here make sure that you have installed the appropriate SDK for your device.
cd your project root, then open .cocos_project.json, find "android_cfg" arg, if you have the folder. if you don't find, then create a new cocos project, cocos compile, then judge which platform can run, in new project folder open .cocos_project.json. You can look for diffences between them.

Ruboto: Android SDK Tools is missing

I'm trying to develop android apps using Ruboto. I can't seem to get it all up and running though. When I try to run something like:
ruboto gen app --package com.test.me --name Test --target android-17
I got the following output:
Found '/usr/bin/adb' but it is not in a proper Android SDK installation.
RuntimeError: The '<ANDROID_HOME>/tools' directory is missing.
Please set the ANDROID_HOME environment variable to a proper Android SDK installation.
I have followed the guide on the Ruboto git site (https://github.com/ruboto/ruboto/wiki/Environment-setup-for-ubuntu) but whatever I do, I still get that error. When I manually go to the directory, the tools directory isn't missing.
Some extra info:
I am using Ubuntu 13.10.
I installed every SDK after running android in the terminal.
I am using jruby through rvm

Upgrading Phonegap Android from 2.5 to 2.6 and 2.7 step

Hi I have problem upgrading Phonegap from 2.5.0 to 2.6.0 and 2.7.0 and specifically with step 8. I'm following the steps from the documentation Upgrading Cordova Android
Copy files from bin/templates/cordova to the cordova directory in your project
Where should I put those files, so they could upgrade my project?
The Android Phonegap conversion docs have changed significantly. There's no longer a step by step process that walks through each upgrade requirement. Instead, theres an "update" program that theoretically does the upgrade automatically. It didn't exactly work this way for me. After going through the documented update process (one step now) I had to go through my project and make sure everything was in place - specifically the cordova-2.7.0.jar and the cordova-2.7.0.js files.
I've just finished upgrading an Android project from Phonegap v2.5.0 to Phonegap v2.7.0. The process I followed was:
Back up the Android project.
Execute the Phonegap update command for v2.7.0 as described in the PG upgrade documentation
Change the current directory to Phonegap for Android directory:
$ cd /phonegap-2.7.0/lib/android
Execute the update command:
$ ./bin/update YOUR/CORDOVA/PROJECT/DIR
Ensure that Eclipse is referencing the correct Phonegap library in the libs directory: cordova-2.7.0.jar.
I also deleted the reference to the previous jar file.
Make sure that the phonegap javascript file (cordova-2.7.0.js) is referenced appropriately in the index.html file.
From within Eclipse: Project/Clean
Build the project and test.
I'm also trying to upgrade from 2.5.0 to 2.7.0 and running the update.bat file gave me the following message: Missing one of the following: JDK: java.oracle.com Android SDK: developer.android.com Apache ant: ant.apache.org – Etienne Desgagné May 27 at 2:15"
You need to check your 'path' System Variables in Environment variables under advanced system settings. JDK is the Java Development Kit and you check if it's correct by 'echo %JAVA_HOME% in a terminal. Ant is an apache thing and again you check that's correct by 'echo %ANT_HOME% and then you just need to make sure your Android SDK folder is in the path variable.

How do I update an Android project from a Jenkins job?

I am setting up Jenkins to clone my git project, update the project, then build using ant. If I perform an ls in the job after cloning the repo, I see my project.properties file present (containing target).
To update the project (and therefore generate the build.xml file) I issue the following command:
android update project -p ./
However, I get the following console output:
Error: The project either has no target set or the target is invalid.
Does anyone know how to update an android project from Jenkins and avoid this problem?
So you've eliminated the first part of the error (i.e. the project does have a target set), but not the second part.
The message "target is invalid" means that you don't have the target platform installed in the Android SDK that Jenkins is using.
e.g. if your target is android-17, then you need to install the Android 4.2 platform (for example via the command android update sdk -u -t android-17).
As an aside, you can automate both the relevant calls to android update -p and the installation of required target platforms using the Android Emulator Plugin for Jenkins.

Android NDK on Mac OSX - quick install w/o Developer Tools

I was just suggested to port some signal processing code to use the Android NDK to speed up the process, but I'm wondering 1. where to install it to and 2. what tool-chain to use
I'd prefer not downloading the 3.5GB Mac Developer Tools if possible. I don't have access to an install cd that has it. Want to try and get this done asap. Does anyone know a way to get NDK development running quickly on OSX(snow leopard)?
A version of make is included with the Android NDK. Simply add {NDK install dir}/prebuilt/darwin-x86/bin to your PATH and you'll be able to build with the NDK.
Unzip the NDK package for Mac OS X anywhere, then add it to your path. That's all you need to build code with the NDK. The NDK includes its own GCC-based toolchain, so you don't even need to have Xcode installed.
Go to the samples in the NDK and type ndk-build in the console to build them.
If you install Xcode, that will install Make.

Categories

Resources