Automatic SDK installation fails on OSX Big Sur
kevinstadler opened this issue · 8 comments
On a fresh install of Android mode 4.5.1, when selecting automatic Android SDK installation it completes the ~250MB download but then fails with a "Bad news" error message.
For anyone else running into the same problem, I managed to set the SDK up manually in the following way:
- manually download the Android SDK Command-Line Tools and extract them into
youruserdirectory/Library/Android/sdk/cmdline-tools/latest - run
~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-33" - back in Processing, open Android mode, choose manual SDK and select the
youruserdirectory/Library/Android/sdkdirectory
On a fresh install of Android mode 4.5.1, when selecting automatic Android SDK installation it completes the ~250MB download but then fails with a "Bad news" error message.
For anyone else running into the same problem, I managed to set the SDK up manually in the following way:
- manually download the Android SDK Command-Line Tools and extract them into
youruserdirectory/Library/Android/sdk/cmdline-tools/latest- run
~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-33"- back in Processing, open Android mode, choose manual SDK and select the
youruserdirectory/Library/Android/sdkdirectory
Hi @kevinstadler , can you please provide Failed logs if possible, we can go through it, mostly error will be in setup I think.
Thanks,
Aditya
PLATFORM NAME macos
processing.mode.android.AndroidSDK$BadSDKException: SDK could not be downloaded
at processing.mode.android.AndroidSDK.download(AndroidSDK.java:548)
at processing.mode.android.AndroidSDK.locate(AndroidSDK.java:509)
at processing.mode.android.AndroidMode.checkSDK(AndroidMode.java:168)
at processing.mode.android.AndroidMode.getSearchPath(AndroidMode.java:207)
at processing.mode.java.RuntimePathBuilder.buildModeSketchPath(RuntimePathBuilder.java:527)
at processing.mode.java.RuntimePathBuilder$CachedRuntimePathFactory.lambda$buildClasspath$0(RuntimePathBuilder.java:685)
at java.base/java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:210)
at processing.mode.java.RuntimePathBuilder$CachedRuntimePathFactory.buildClasspath(RuntimePathBuilder.java:684)
at processing.mode.java.RuntimePathBuilder.lambda$prepareSketchClassPath$0(RuntimePathBuilder.java:319)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
at processing.mode.java.RuntimePathBuilder.prepareSketchClassPath(RuntimePathBuilder.java:321)
at processing.mode.java.RuntimePathBuilder.prepareClassPath(RuntimePathBuilder.java:290)
at processing.mode.java.PreprocService.preprocessSketch(PreprocService.java:452)
at processing.mode.java.PreprocService.mainLoop(PreprocService.java:134)
at java.base/java.lang.Thread.run(Thread.java:833)
hello,
same problem here: processing 4.3, mac os 14
2ND THAT : same problem here: processing 4.3, mac os 14
Thanks, @kevinstadler, for sharing this. Saved my day. I don't have the background to solve the issue, but I hope documenting my experience helps. I am experienced with Processing, but not with Android. The mode looks awesome and I would like to contribute at least with this.
It has been a ride to get it working because the documentation was not easy to follow. I tried to use the instructions about installing the Studio as indicated on the Install page and failed. The inconsistencies started with the Installing from the IDE which, as reported by so many, fails with the automatic update.
When installing and selecting the default Studio, it doesn't work. Setting the path from the preferences.txt doesn't solve the issue either. Many pages and forums mention using a wiki page which is down, that didn't help either.
Then, the Getting Started page mentions installing manually the platform version 26, but the IDE asks for the version 33. Downgrading the SDK installed by Studio (which default installs version 35 to version 33 required by the current IDE), and installing the command tools, as indicated here, solved my headaches.
Processing 4.3
macOs 13.6.1
It took my whole Sunday. I fixed the issue by downloading Android studio. Follow the steps. Remove any old sdk folders inside you Processing's Android folder if there are any.
My setup;
- Mac OS 13.6.6 on Apple M2
- Processing 4.3
- Samsung A54 (Developer Mode enabled with the latest OS One UI 6.0, Android 14)
- Install your device’s software and drivers, if it is required. Mine is “Samsung Smart Switch”
- While installing the Samsung Smart Switch, your Mac will ask you for several permissions. Allow access from your Mac whenever prompted. This is required to make my phone identified by the computer.
- Download and Install the latest Android Studio.
- After the installation is done, open the Android Studio and click on
SDK Manager

- Install SDK 33

- Then install
Command Line Tools. It is required by Processing.

- Open the Processing App and choose to install
Android Mode

- Select to set SDK manually option and choose the SDK path on your Mac. It should be as follows;
/Users/<your_username>/Library/Android/sdk - If you get no error, or warning, then you are good to go.
- Connect your Android device to your computer. Make sure your your device is identified by your computer. Hit the
Runbutton and you will see the following image. It will install additional packages and deploy the app to your Android device.

- Hit Run
On a fresh install of Android mode 4.5.1, when selecting automatic Android SDK installation it completes the ~250MB download but then fails with a "Bad news" error message.
For anyone else running into the same problem, I managed to set the SDK up manually in the following way:
- manually download the Android SDK Command-Line Tools and extract them into
youruserdirectory/Library/Android/sdk/cmdline-tools/latest- run
~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-33"- back in Processing, open Android mode, choose manual SDK and select the
youruserdirectory/Library/Android/sdkdirectory
in a mac with Sonoma 14.5 after I run the command I get:
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Then locate the path manually in Processing still does not work. I will try alptugan metod (I´m just afraid of the automatic updates from the wizzard manager in Android Studio)
The SDK installation should be working again with version 4.6.0 of the mode: https://github.com/processing/processing-android/releases/tag/latest