Loading...
Logo
Processing Forum

Google API problem

in Android Processing  •  1 year ago  
Hello, I am trying to make my first app on my nexus 7 using processing.
I have processing 1.5.1 I have installed the sdk platform and google APIs
When I press run on the android version of processing, I get the following error:
"The Google APIs are not installed properly"
From the snd manager, it says that the google API is installed.
Therefore, I do not get what is going on.
Thank you.

Replies(22)

Try installing them again. Make sure that you have one of the later versions (with a Nexus 7 you should use API 16). In general, they are difficult to set up.
yes, I did that. It shows that both api 16 and 10 are installed.
I tried for each, no dice
I tried to move the entire sdk folder into another place on my computer.
Now it gives me the error: "An error occured while running "android create avd" The defult android emulator could not be set up. Make sure that the Android SDK is installed properly and that the android and google apis are installed for level 6. (Between you and me, occasionally, this error is a red herring, and your sketch may be launching shortly.)"
In the console it reads: "Could not create a virtual device for the emulator.

How can I switch the path (b/c i movied it) for processing to find the SDK?
It doesn't give me the option in the error message
Please help
I can't even run the sdk through processing (only through the folder and clicking on the unix file android can I get on the sdk) 
In that case... perhaps your Android SDK points to the wrong location. You can fix this:
  • Locate the Android SDK with a file browser. Remember the path.
  • Open File > Preferences.
  • Click on the link to the "preferences.txt" file at the bottom.
  • Open "preferences.txt" (if it has not already done so) with a plain text editor.
  • Modify the property "android.sdk.path" to be the location that you found earlier. If it does not exist, then create it. Mine looks like this: "android.sdk.path=C:\Program Files (x86)\Android\android-sdk" (without  quotes, and that's with Windows slashes).

If this doesn't work, then it must be something else.
Now I'm back to the old problem: the Google APIs are not installed properly issue

Can you launch the SDK Manager from Processing?
Now I can, yes.
Still issue with the a pi, SDK says its installed for 4.1 and 2.3.3.
Also I don't see any processing devices
Okay... try creating a device and running it. If you can do this, then there is a problem with Processing. If not, there is a problem with Android. Sometimes the problem with Processing is that it fails to create an emulator. In this case, you can create an emulator called "Processing- XXXX" (with the XXXX being the version, e.g. 0206 for 2.0a8).

I don't get how to do that
I'm in create new AVD
I'm running processing 1.5.1
So is the device supposed to be "Processing-0151"?
I choose for target: "android 4.1"
For CPU/abi I don't know to use, I ended up using Intel atom (running a Mac so best guess)
I click create avd
I can start the emulator using the SDK
But in processing I'm still getting the Google a pi problem

That would be "Processing-0197" for Processing 1.5.1, but then we have another problem. I'm afraid that I failed to notice that you listed this in your original post... Processing 1.5.1 for Android is officially deprecated and won't work with any of the newer APIs. Get Processing 2.0b3 (the latest beta release).
Wow, never mind, my fault.
It now works
I can run it on my nexus 7, but is there a way to make it a stand alone android application?
Also, is there a way of me being able to share it with other people in the processing community?
more good news i found out a way. 
Not sure if it's right though.
I just went into the command line, went into the android folder for the processing project, and typed ant debug.
It made a adk file in my bin folder. 
I went to setting and allowed it to install 3rd party apps.
I used air droid and installed the adk file into the apps folder. 
I was able to find the app in the apps menu of the nexus 7.

Is there a better way to do this?
Yes, there is a better way. You can always ship around the debug version of the apk to other devices for testing (this is automatically built by Processing, no need to do it yourself). See this thread (specifically ckmath's response). If I remember correctly, this will give you a signed .apk file that can be uploaded to the Android Market.
I'm using a mac so I'm not sure if i'm doing this right, for step 3, i typed this in the directory: ~/Documents/Processing/BezierFun/android/ keytool -genkey -v keystore BezierFun- release-key.keystore -alias Glenn -keyalg RSA -keysize 2048 -validity 10000

But I got this message: /Users/Glenn/Documents/Processing/BezierFun/android/: is a directory

So i googled and i found this page:  http://teacherben.com/?p=223&cpage=1#comment-1951
I left a comment, but got no response yet.

I got to step 7) 
But when i wrote my version (using my paths) of this :  /Users/benjamincooperman/Documents/Processing/test01/android/zipalign -v 4 /Users/benjamincooperman/Documents/Processing/test01/android/bin/test01-release-unsigned.apk test01.apk

it says something like  no such file or directory for the zipalign.
From the introduction the author says that it's a command (not a directory/folder)
any ideas why I got this message?
Okay... you're clearly new to the command line (or Terminal on a Mac), which isn't a bad thing. I was too when I first tried this...

The first thing to do is to check if keytool, jarsigner, zipalign, and ant are set up properly. Type each and press enter. If it does not find the tool (or doesn't spit out a long list of statements), then the tools are not installed properly. They should be located in the JDK installation folder. I'm on Windows, so I have no clue how to troubleshoot for this problem on a Mac.

Then, cd to the directory where the unsigned .apk file is located. In other words, type this:

Copy code
  1. cd ~/Documents/Processing/BezierFun/android/

This moves the current directory that is being used by the commands in the command line to the specified folder.

Now, you should be able to generate your key. Every time that you close the command line, you have to re-cd to this folder. Continue with the steps.
Hello, no i don't have any experience with terminal.
I typed in all of the commands, the only one i didn't have was zipalign.

I have no clue how to install it on the mac.
I thought it would be in the android sdk manager under tools, but it's not there.

I went into the sdk folder in and went into tools.
I found a unix executible file called zipalign, i double clicked on that
terminal popped open and i got this:
/Users/Glenn/Documents/Android/android-sdk-macosx/tools/zipalign ; exit;
Glenns-MacBook-Pro:~ Glenn$ /Users/Glenn/Documents/Android/android-sdk-macosx/tools/zipalign ; exit;
Zip alignment utility
Copyright (C) 2009 The Android Open Source Project

Usage: zipalign [-f] [-v] <align> infile.zip outfile.zip
       zipalign -c [-v] <align> infile.zip

  <align>: alignment in bytes, e.g. '4' provides 32-bit alignment
  -c: check alignment only (does not modify file)
  -f: overwrite existing outfile.zip
  -v: verbose output
logout

[Process completed]

I opend a new terminal window, but when i typed zipalign, i get no command found.

Any other ideas, tried googling, found nothing
On Windows, you would have to add zipalign to the PATH variable. I don't know the Mac equivalent to that.
Short answer: Yes.

So i part 7:
PATH=$PATH:/path/to/look/for/new/apps/:

should i type something like for a new app
PATH=$PATH:~/Documents/Android/android-sdk-macosx/tools/zipalign/: (is this exactly, is end ending wrong)?

but i already have zipalign in that folder, so should i use the other on it mentions:
 PATH=”¦ statement just append the “ œ:/path/to/look/for/new/apps/: ”

so this:  PATH=”¦ statement just append the  " ~/Documents/Android/android-sdk-macosx/tools/zipalign/:"
when it says, statement just appended i'm thinking that means the existing path so you would do something like echo $PATH

echo $PATH in tools folder is this: 
/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin

so should it be this in the end?:
PATH=; /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin ~/Documents/Android/android-sdk-macosx/tools/zipalign/:"

I really don't want to screw it up even more.
please help