Let's Make Robots!

Help with installing Andriod SDK (Solved)

It pains me to ask for help here, but it has been 2 fairly solid days of installs with no luck.

I got a new fancy phone (HTC Evo) which runs Android 2.2. I of course, want to get this phone talking to various robot brains. I did the usual searches and it seems that no matter what you are doing (android to arduino, android to processing, etc) they all start with installing the SDK. In my case, I plan to use Processing 1.5.1 which is "android ready".

I have downloaded the new version of processing and installed it. --No problem

I downloaded the Android SDK and installed it as well. I also installed all the "packages" that go with it ("packages" for different droid versions, different phones, etc --I didn't pick and choose here, either-- I installed every package available with the most recient version. It installed properly, and if I try to install again, I get a note that it is indeed installed and I am asked if I want to re-install on top of it --I.e. the computer knows it is there.

Now, when I run processing (which opens just fine) I click the "android" tab and I get a message that, "SDK is not installed" and the "SDK_Variable is not set" and "if it is installed, would you like to browse for it?" and also, "if it is not installed do you want to download?" --I have browsed many times, gone right to the android SDK file but alas, I just keep getting an "open" button (not an "OK" button" --This tells me that I might be missing the actual file I am looking for and instead I am wasting my time aimlessly opening folders.

I have also included the Android SDK file to the PATH as well. I am not really versed in this whole concept of the system "PATH" but I followed many tutorials (which all agreed on how to do it and what to type in) and I am 95% sure I entered the correct path for the andriod SDK "tools" file.

At this point, it all comes down to Processing figuring out where the darn SDK file is, correcting any mistake I made with the "PATH" and/or figuring out what file or folder I seem to be missing. --OR-- something else I am missing entirely.

Anything of any kind would be appreciated here. --Thanks

**SOLVED**

It just goes to show, when in doubt --clean your desk.

This issue is solved, I have everything up and running. In the end, all the tutorials were correct and when followed, work a treat however the install seems to work a lot better when there are not (4) stray copies of Processing floating around your machine. It looks like files got "split" between places and different copies of Processing decided to grab whatever they wanted during the install. I did some good ol' house keeping, cleaned my main drive and desktop, backed-up my code and reinstalled one single copy of Processing 1.5.1. Problem solved.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi, long time lurker here who about to post something that may be stupid but... here we go:


I installed a new version of processing (1.5.1) because i wanted to work on a little prog (...). Anyway i noticed
this "standard" box that wasnt here in the old version, so i clicked on it by curiosity (like a retard some might say ~~)
and now every time i start my old prog, it keep asking my for the android sdk.


I was curious about your problem with it too, so i tried to install it to see if it'll bug like you and if it'll stop it begging for it .

So this is what i did to have it running:

dl android sdk

Tried to install it, it wanted JAVA se development kit (JDK)

Had to add C:\Program Files\Java\jdk1.6.0_26\bin to path in user variable

installed android SDK

added with SDK manager:

SDK platform android 3.1 api 12 rev 2
+ Google APIs by google inc., Android API 12, rev 1


Started processing, switched to android, it wanted me to select a directory:


 "Ouvrir" means open

just like that


or

Inside your C:\Documents and Settings\your_user_name\Application Data\Processing\preferences (or start > run > %appdata% for xp > processing)

you should have a line like this:

android.sdk.path=C:\Program Files\Android\android-sdk


Tried to run with the emulator this example: (http://cagewebdev.com/android/gps_example.zip)

if you have this error:

"BUILD FAILED
C:\DOCUME~1\your_user_name\LOCALS~1\Temp\android2999589021509091956.pde\build.xml:16: Unable to resolve target 'android-7'
"

Just install

SDK Platform Android 2.1, API 7, revision 2
and
Google APIs by Google Inc., Android API 7, revision 1

it worked after that and processing stopped pissing me off with it when loading my prog.

maybe that can help you , maybe not.

 

note1: my english is awful x___x

Is the Androd SDK installed?

The Android sdk does not appear to be installed, because the ANDROID_SDK variable is not set. If it is installed, click "Yes" to select the location of the SDK, or "No" to visit the SDK download site at http: bla bla

 

Is the error your getting "exactly" what was written ?
SO it fails - "check to make sure the ANDROID_SDK variable" ?
This code snippet is taken from http://processing.googlecode.com/svn-history/r6138/trunk/processing/app/src/processing/app/tools/android/Android.java
If you go through the check the code is using you "shouldn't" be failing....
protected boolean checkPath() {
    Platform platform = Base.getPlatform();
    
    // check for ANDROID_SDK environment variable
    sdkPath = platform.getenv("ANDROID_SDK");
    if (sdkPath == null) {
      Base.showWarning("Android Tools Error",
                       "Before using Android mode, you must first set the\n" +
                       "ANDROID_SDK environment variable, and restart Processing.", null);
      return false;
    }

    // check to make sure the ANDROID_SDK variable is legit
    File toolsFolder = new File(sdkPath, "tools");
    if (!toolsFolder.exists()) {
      Base.showWarning("Android Tools Error",
                       "The ANDROID_SDK environment variable is set incorrectly,\n" +
                       "or the directory no longer exists. No tools folder was\n" +
                       "found in " + toolsFolder.getAbsolutePath() + ".\n" +
                       "Please fix the location and restart Processing.", null);
      return false;
    }

    // make sure that $ANDROID_SDK/tools has been added to the PATH
    try {
      String canonicalTools = toolsFolder.getCanonicalPath(); 
      String envPath = platform.getenv("PATH");
      String[] entries = PApplet.split(envPath, File.pathSeparatorChar);
      for (String entry : entries) {
        String canonicalEntry = new File(entry).getCanonicalPath();
        if (canonicalEntry.equals(canonicalTools)) {
          if (Base.isWindows()) {
            if (new File(toolsFolder, "android.bat").exists()) {
              toolName = "android.bat";
            } else if (new File(toolsFolder, "android.exe").exists()) {
              toolName = "android.exe";
            }
          }
          return true;
        }
      }
      Base.showWarning("Android Tools Error",
                       "You need to add the tools folder of the Android SDK\n" +
                       "to your PATH environment variable and restart Processing.\n" + 
                       "The folder is: " + toolsFolder.getAbsolutePath() + ".", null);
    } catch (IOException e) {
      Base.showWarning("Android Tools Error",
                       "Error while trying to check the PATH for the Android tools.", e);
    }
    return false;
  }