We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpProcessing Implementations › Processing Android -Android and Google APIs level6
Page Index Toggle Pages: 1
Processing Android -Android and Google APIs level6 (Read 7940 times)
Processing Android -Android and Google APIs level6
Jun 11th, 2010, 2:58pm
 
'ello, after much googling I need a hand.

I read this: http://android.processing.org/
and this: http://createdigitalmotion.com/2009/12/teaser-processing-is-coming-to-android/

Followed instructions and downloaded a pre-release of processing so I can start playing with Android (I picked up a HTC desire and I'm really enjoying it).

Running in Android mode I am getting the following error:

"An error occurred while running "android create avd" to set the default Android emulator. Make sure that the Android SDK is installed properly, and that the Android and Google APIs are installed for level 6"

I have the latest SDK with Google API level 8. I don't have the option for the level 6 API in my SDK and AVD Manager for download (though I do have options for APIs 7, 4 and 3). Scratching my head.

Help, as ever would be much appreciated.

S
Re: Processing Android -Android and Google APIs level6
Reply #1 - Jun 11th, 2010, 4:38pm
 
That's odd. You should have API 6 available. Have you confirmed that the reason it's unavailable is not that it actually is *already* downloaded?

Usually this error pops up if you don't have the downloaded SDK of that version in the correct path.

Anyway, worst-case scenario would be to try downloading the newer SDK (API 8); these are minimum versions.
Re: Processing Android -Android and Google APIs level6
Reply #2 - Jun 14th, 2010, 5:00am
 
Crumbs, still having problems with this (thanks for the reply though).
So I started again, downloading the Android SDK, unzipping and putting in my applications directory. I also added the location of the SDK's primary tools directory to my system PATH (though I'm not sure this was necessary). I now have the following error, after a pause of about 15 seconds:

Could not download Android core.zip

Puzzling.


-------------------------------------

java.net.ConnectException: Operation timed out
     at java.net.PlainSocketImpl.socketConnect(Native Method)
     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
     at java.net.Socket.connect(Socket.java:524)
     at java.net.Socket.connect(Socket.java:474)
     at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
     at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
     at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
     at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
     at sun.net.www.http.HttpClient.New(HttpClient.java:304)
     at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:846)
     at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:805)
     at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:716)
     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:960)
     at java.net.URL.openStream(URL.java:1007)
     at processing.app.tools.android.AndroidTool.checkCore(Unknown Source)
     at processing.app.tools.android.AndroidTool.run(Unknown Source)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
69)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190
)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Re: Processing Android -Android and Google APIs level6
Reply #3 - Jun 14th, 2010, 3:27pm
 
Hi,
I am getting the exakt same error, "Could not download Android Core.zip" that is.
Re: Processing Android -Android and Google APIs level6
Reply #4 - Jun 14th, 2010, 3:28pm
 
output gives me this: (sorry for the double post, had to make "one normal post" before posting this)

java.io.FileNotFoundException: http://code.google.com/p/processing/source/browse/*checkout*/tags/processing-0184/android/core.zip
     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
     at java.net.URL.openStream(URL.java:1010)
     at processing.app.tools.android.AndroidTool.checkCore(Unknown Source)
     at processing.app.tools.android.AndroidTool.run(Unknown Source)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269
)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174
)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

EDIT: im gonna make a wild guess and suggest that "http://dev.processing.org/source/index.cgi/*checkout*" +
   "/tags/processing-" + Base.VERSION_NAME + "/android/core.zip" does not exist, cuz i can't find it in the svn :p


EDIT2: wait there it is...
Re: Processing Android -Android and Google APIs level6
Reply #5 - Jun 14th, 2010, 4:24pm
 
Actually, on a third thought!
isn't line 46-48 in AndroidTool.java wrong ?

Code:
private static final String ANDROID_CORE_URL = 
   "http://dev.processing.org/source/index.cgi/*checkout*" +
   "/tags/processing-" + Base.VERSION_NAME + "/android/core.zip";


shouldn't it be this with the new google server:
Code:
private static final String ANDROID_CORE_URL = 
   "http://processing.googlecode.com/svn/tags/processing-" + Base.VERSION_NAME + "/android/core.zip";


or something very much like it ?

(im still downloading cygwin so i can't compile the souce to check for myself)
Re: Processing Android -Android and Google APIs level6
Reply #6 - Jun 15th, 2010, 1:13am
 
well I've scrubbed all versions (both processing and the SDK) and re installed. A little closer this time, just a few errors.

Switching to 'Android' mode displays "Done loading Android tools" in the processing IDE which sounds good. I then run my basic test sketch and immediately have the alert box displaying:

"An error occurred while running "android create avd" to set the default Android emulator. Make sure that the Android SDK is installed properly, and that the Android and Google APIs are installed for level 6"

I click ok, a small alert box with progress bar appears for a fraction of a second, too quick to read or screen grab, and then the IDE displays "Unable to resolve target 'Google Inc.:Google APIs:6'"

So no reams of red error text now just what I described above. Ummmm, still puzzled here.
Re: Processing Android -Android and Google APIs level6
Reply #7 - Jun 17th, 2010, 5:14am
 
Hey  Guss,

Any joy checking out the source?

Thanks

S
Re: Processing Android -Android and Google APIs level6
Reply #8 - Jun 17th, 2010, 7:12am
 
Well i only had the problem with "Could not download Android Core.zip" and after failing with cygwin and therefor not being able to compile the source i continued reading the source to find that all the program is trying to do is:
1) download core.zip from the server (and this is where it failed causing the error, and im still pretty sure it has to do with the URL in the source code)

2)rename core.zip to  "processing-android-core-" + Base.VERSION_NAME + ".zip" which is "processing-android-core-0184.zip" is our case

3) save "processing-android-core-0184.zip" in the sketchbook folder so that processing didn't need to download it again

So what i did was just to pull core.zip of the server manually, rename it and the place it in the sketchbook folder.
thus solving the problem and everything is now working as (i think) it should for me.

So im not having your new error and i have no idea what's causing it, sorry Sad


EDIT: ok i've done some reading and it appears that your error comes from this file: http://code.google.com/p/processing/source/browse/trunk/processing/android/tool/...
As you can see the error is showed when processing fails to verify that the AVD (androice virtual devide) exist or fails to create the AVD (or both):
Code:
(ECLAIR.exists(sdk) || ECLAIR.create(sdk)) 



From what i could tell from your post there is no stack trace meaning a excetion is not thrown, which might mean... something :/

but if i had to guess i'd say that you haven't installed the Android SDK correctly so try reinstalling it Smiley
Re: Processing Android -Android and Google APIs level6
Reply #9 - Jun 17th, 2010, 7:25am
 
ok, thanks for the reply, I'll try and follow your set up and post back any progress.

Cheers

S
Re: Processing Android -Android and Google APIs level6
Reply #10 - Jun 17th, 2010, 7:29am
 
sci wrote on Jun 15th, 2010, 1:13am:
I click ok, a small alert box with progress bar appears for a fraction of a second, too quick to read or screen grab, and then the IDE displays "Unable to resolve target 'Google Inc.:Google APIs:6'"


I think the problem here is that Google is no longer shipping anything with API level 6 when you download the most recent Android SDKs - it currently only has 3, 4, 7, and 8.  This must have just changed recently if there haven't been complaints about it before, but there will be lots of complaints about it soon, as API level 6 seems to be completely and utterly unavailable at this point unless you already have it installed.

I'm not sure what the best solution is, here - I've only just gotten started with Android dev - so maybe someone that knows a bit more can comment  It appears to be line 464 of the processing.app.tools.android.Build file in the Android tool that's responsible for generating that command line string, if that helps at all.  The thing to do would probably be to aim for the specified version or any higher one, but a cursory glance at the Android docs didn't tell me the best way to do that - the software could probably run "android list targets" and then parse the results, but that seems a very fragile and sloppy way to do things.
Re: Processing Android -Android and Google APIs level6
Reply #11 - Jun 17th, 2010, 7:30am
 
Note the Edit to my previous post, i though i had time to edit before you saw the post apparently i did not :p
Re: Processing Android -Android and Google APIs level6
Reply #12 - Jun 17th, 2010, 7:57am
 
Exactly Eric, I thought this would possibly be the case (I noted the lack of API level 6 in my first post), thanks for explaining this further. For now I guess I'll try and follow Guss's set up an await some more info here (hopefully). I'm itching to get playing with Android and Processing, as I know are plenty of other processing users. Looking forward to seeing this functionality fully operational in a future official release!

Thanks again both,

S
Page Index Toggle Pages: 1