I’m going through the installation tutorial and get the following error when I try to add android:
cordova platform add android
Checking Android requirements…
[Error: Please install Android target 17 (the Android 4.2 SDK). Make sure you have the latest Android tools installed as well. Run android from your command-line to install/update any missing SDKs or tools.]
When you install the sdk you have to open de Android SDK Manager, in the terminal with the “android” command, then you need to install the target 17, if you already do that maybe your PATH is not pointing to the right location of your SDK.
Thanks, I’ve installed all of API 17 using the android command and its manager window. The path to the SDK looks to be working as well.
Here is what I get now:
cordova platform add android
Checking Android requirements…
Creating android project…
[Error: An error occured during creation of android sub-project.
[Error: ERROR : Make sure JAVA_HOME is set, as well as paths to your JDK and JRE for java.]
]
I then set the JAVA_HOME path in my bash_profile to:
export JAVA_HOME=/usr/libexec/java_home
Then restarted the terminal, then tried again and got the following result:
cordova platform add android
Checking Android requirements…
[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 path. Output: ]
Also, when I try the android command again I get:
android
Unable to locate an executable at “/usr/libexec/java_home/bin/java” (-1)
Unable to locate an executable at “/usr/libexec/java_home/bin/java” (-1)
Unable to locate an executable at “/usr/libexec/java_home/bin/java” (-1)
Then when I comment out the JAVA_HOME path from my bash_profile and restart the terminal the whole series of steps list above is required again, without success.
Is there something wrong with the Java SDK installed on my machine or the path?
I’ve installed the latest Apple update for Java, here is what the terminal now says:
java -version
java version "1.7.0_04"
Java™ SE Runtime Environment (build 1.7.0_04-b21)
Java HotSpot™ 64-Bit Server VM (build 23.0-b21, mixed mode)
After that I still have the following result:
cordova platform add android
Checking Android requirements…
Creating android project…
[Error: An error occured during creation of android sub-project.
[Error: ERROR : Make sure JAVA_HOME is set, as well as paths to your JDK and JRE for java.]
]
Looking around there seems to be huge confusion on how to activate Java on OS X. Do I now also need to download and install the Oracle Java package from the following link?
Happy to say that this problem is solved, discovered that my JAVA_HOME needed to be set to:
export JAVA_HOME=/usr/libexec/java_home -v 1.7
I needed to tell OS X where to look specifically as there is no more Java Control Panel, the issue is generally Apple and the endless Java headaches on OS X. It also was not necessary to download more Java Junk from Oracle.
I’m on OS X 10.7.5 with the latest Java update from Apple and no extra Oracle Java downloads.
Getting through the installation section of the tutorial was quite involved. There are many things to take care of on the Android side and really not any very clear info out there.
Just a suggestion but it might be useful to gather some aside links and short descriptions of the kind of things that might be encountered per platform, which the present installation section kinda wings over. Maybe an aside page in a FAQ format with links for topics.
One thing we are eventually going to have is some kind of web-based dev/testing service which means no installation needed. That will probably be part of our business behind Ionic.
Sounds very good and I’m looking forward to learning more
I’ll carry on through the rest of the tutorial next. One of my goals once that is done is to see if I can have a small D3.js sample running in an Iconic app then also the HTML5 canvas element. Are there already graphic capabilities in any of the Iconic components?
Awesome. No graphic stuff built in beyond DOM nodes that we use, so you’d want to do that yourself. However, we’d love to have a contributed D3 example, so let us know if you’d like to share!
i got this error as well. any tips/suggestions? trying to check my app on android platform. i have the latest mac os software, version 10.9.2 and was asked to download the Java update when first tried to add android platform to project.