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
Related
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.
I've read this: Cordova and setting Android using command line
and that How to add android to cordova platform? PATH error? and generally speaking whole documentation. I've added both 'platform-tool' and 'tool' paths, installed android 4.4 and I'm still getting the error from the tittle when I'm trying cordova platform add android to my current project ( in cmd and in netbeans ).
The only thing I haven't done is adding java and ant to path. I was trying with ;%JAVA_HOME%\bin;%ANT_HOME%\bin but still those commands aren't recognizable.
What else can I do?
EDIT:
I've added java and ant to PATH. This is what I get in cmd:
C:\xampp\htdocs\mobile_maps>cordova platform add android
[Error: The command `android` failed. Make sure you have the latest Android SDK
installed, and the `android` command (inside the tools/ folder) added to your pa
th. Output: ]
Second EDIT:
i also get 'xcopy' is not recognized as an internal or external command even though I've added %SystemRoot%\System32; %SystemRoot%; %SystemRoot%\System32\wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0 . I really don't know what else I can do..
usually this happens when:
1. Java is not installed
2. Java is not exported (no JAVA_HOME env variable) or paths are wrong
3. only 64bit version of Java is installed
to fix install 32bit support on your system.
and (as comments below) relog in Windows to environment changes take effect.
I am new to Ruboto gem. I am currently working on android with Ruboto. I know android. I have installed the all requirements for Rubuto. I try to created the sample project using following command,
$ ruboto gen app --package org.sample.rubotoapp --target android-17
Output: Android SDK not in path
/bin/sh: android: not found
Please anybody can solve my problem. Thanks....
It looks like the Android SDK tools directory is not in your path. If you check you path variable with
echo $PATH
it will probably not contain the Android SDK tools directory. Also, you can check if the "android" command is in your path using
which android
You will probably get an empty response.
If you use Ruboto 0.12.0, you should be able to use
ruboto setup
to configure your environment. Recently, in Android SDK r22, the path to the build tools was changed. This will break your setup, and you will have to add
<android sdk location>/build-tools/17.0.0
to your path manually. This is fixed for Ruboto 0.13.0 which will be released in june.
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.
When I try to install the android SDK it fails to install.
My OS is Windows XP
I just downloaded and installed Java JDK 1.6
Java -version from the command line returns:
https://stackoverflow.com/questions/ask
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
My environment vars have:
JAVA_HOME=c:\progra~1\java\jdk1.6.0_11
I downloaded android-sdk-r04-windows.zip
I unziped it in V:\AndroidInstall\
When I go to the
V:\androindinstall\android-sdk-windows>
and type "SDK Install.exe" nothing happens...
If I go this from graph
When I do this from a graphical file viewer I get a quick flash that looks like a command line window and nothing....
When I try to run
android list targets
from the tool directory I get:
Error: Error parsing the sdk.
Error: V:\androindinstall\android-sdk-windows\platforms is missing.
Error: Unable to parse SDK content.
So the basic install setup is not happening.
Additional clues:
I have a G1 and Android 1.0 was running on this machine. (Almost a year ago)
I've updated my G1 to 1.6 so I thought I'd update my SDK before starting new development.
When I tried to upgrade it tried and then died as the "directory was in use"
So I cleaned out all the android directories, rebooted and redownloaded everythign from scratch.
Now it won't run at all.
I've clearly got something in an unhappy state, but I've cleaned up all the directories and no remanants seem to be running I've rebooted....
I've missed somethign I just can't figure out what.
Paul
You should manually create 2 more directories under your root sdk dir 'android-sdk-windows':
platforms
add-ons
and than start SDK Setup.exe from the root directory or try to open it from Eclipse
'Window' -> 'Android SDK and AVD manager'
Run the SDK setup
Wait for the error message
Disable anti virus
Install this unlocker program http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
Run the unlocker program
select the tools directory to unlock it
select yes in the installer.
This is what worked for me.
http://code.google.com/p/android/issues/detail?id=4410#c41
The directories "platforms" and "add-ons" need to be manually installed in the android SDK directory (parallel to "tool"). This is only necessary in a new installation.
I had the same problem, adding the directory add-ons got rid of the error when eclipse is first open but I still couldn't download packages from the sdk manager.
What solved this problem for me (in windows 8) is running eclipse as administrator.
I got this error from my Jenkins CI.
It was because the Jenkins user did not have permissions on the android-sdk-linux folder.
(not the best solution but fixed it with):
sudo chmod -R 777 /usr/bin/android-sdk-linux