You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatic SDK installation fails on OSX Big Sur #756
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/sdk directory
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/sdk directory
Hi @kevinstadler , can you please provide Failed logs if possible, we can go through it, mostly error will be in setup I think.
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)
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.
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 Run button and you will see the following image. It will install additional packages and deploy the app to your Android device.
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/sdk directory
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)
Activity
ranaaditya commentedon Sep 25, 2023
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
kevinstadler commentedon Sep 25, 2023
kabrio commentedon Oct 9, 2023
hello,
same problem here: processing 4.3, mac os 14
leoleakey commentedon Jan 9, 2024
2ND THAT : same problem here: processing 4.3, mac os 14
todocono commentedon Apr 6, 2024
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
alptugan commentedon Apr 7, 2024
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;
SDK ManagerCommand Line Tools. It is required by Processing.Android Mode/Users/<your_username>/Library/Android/sdkRunbutton and you will see the following image. It will install additional packages and deploy the app to your Android device.rodolfoacostacastro commentedon May 23, 2024
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)
codeanticode commentedon Jun 10, 2024
The SDK installation should be working again with version 4.6.0 of the mode: https://github.com/processing/processing-android/releases/tag/latest