Hi, I’m trying to get started with Android mode. When I switch a blank sketch to Android mode it offers to auto-download the SDK or for you to locate it.
If I select auto-download it fails, same as here. I’ve tried removing and re-installing Android mode - no help. (The remove from manage libraries did nothing, I had to delete the directory.)
I’ve tried downloading the SDK command line tools, and pointing it at that e.g. D:\Programs\Android_SDK_cmdline-tools. There are bin and lib directories in there, tried them all and it doesn’t accept any.
I have Android Studio (AS) installed and working. I can run a program on a phone. (It only runs from the Studio, apparently if you want an installed program you have to do more things. Not followed that up yet. The Processing way was better when I had it working a while back.)
When I try to run Processing Android Mode it complains about the SDK: “… install the SDK Platform for API 33”. At the top of AS there is “Medium Phone API 35”. so I think that’s the issue. I’ve found the SDK manager and am downloading v 33. More soon I hope.
…
I’m not winning. Whatever I try the Processing does not accept the SDK. In AS i deselected 35, selected 33, waited for it to adjust everything. Not convinced it deleted 35, I deselected both, waited, deleted the SDK files manually, reselected 33 - same.
I’ve seen words like “for the SDK manually, then download SDK command line tools”. Is the SDK the same as the CommandLineTools?
I’ve tried to find the SDK API 33 to download manually. Find lots of recommended links that say how to do it in AS. Found links that are broken. Maybe it’s moved, been deleted?
@glv, Thanks for the pictures, that’s what I would expect. When I click on ‘Download SDK automatically’ it shows a dialogue: “Bad News… The Andriod SDK could not be loaded. The Android mode will be disabled.” This appears instantly, so quickly it makes me think it hasn’t gone out to the internet. (Internet is fine, YouTube, Processing Forum, etc.)(Not disk full.)
try updating Processing to 4.3.2 - no better.
Try another computer (borrowed) Windows 10 Enterprise, 22H2. Processing 4.3 (.0?) - yes, downloading and stable in Android Mode.
Hi @RichardDL, what is the model of the computer on which this is failing?
Based this comment on GitHub, a possible workaround is to install the Android SDK manually:
downloaded android studio manually and using its sdk manager downloaded API 26 platform. Then instead of download, located to the path to Android SDK. It is also could be seen in Processing File > Preferences > C…\ preferences.txt like this: android.sdk.path=C:\Users\MyName\AppData\Local\Android\Sdk
Hi @sableRalph, thanks for your interest. The failing computer is Windows 10 Home, 22H2. Processing 4.3.2. The working one is the same but ‘Enterprise’. Now I’ve copied the sdk directory from the working computer to the non-working. Also copied the preferences.txt. Also moved Processing (.exe etc.) and the sketch directory from D: to C:. Now everything is the same as the working PC but it still does not work. When it says ‘Locate the sdk manually’ I paste in the string lifted from explorer ‘C:\RDL\Processing\android\sdk’ (the same as is already in preferences.txt) and it says “The Android SDK could not be loaded”. I wonder what ‘loaded’ means and what is going wrong.