Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic SDK installation fails on OSX Big Sur #756

Open
kevinstadler opened this issue Sep 24, 2023 · 6 comments
Open

Automatic SDK installation fails on OSX Big Sur #756

kevinstadler opened this issue Sep 24, 2023 · 6 comments

Comments

@kevinstadler
Copy link

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:

  1. manually download the Android SDK Command-Line Tools and extract them into youruserdirectory/Library/Android/sdk/cmdline-tools/latest
  2. run ~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-33"
  3. back in Processing, open Android mode, choose manual SDK and select the youruserdirectory/Library/Android/sdk directory
@ranaaditya
Copy link
Member

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:

  1. manually download the Android SDK Command-Line Tools and extract them into youruserdirectory/Library/Android/sdk/cmdline-tools/latest
  2. run ~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-33"
  3. 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.

Thanks,
Aditya

@kevinstadler
Copy link
Author

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)

@kabrio
Copy link

kabrio commented Oct 9, 2023

hello,

same problem here: processing 4.3, mac os 14

@leoleakey
Copy link

2ND THAT : same problem here: processing 4.3, mac os 14

@todocono
Copy link

todocono commented 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
Copy link

alptugan commented 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;

  • 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)
  1. Install your device’s software and drivers, if it is required. Mine is “Samsung Smart Switch”
  2. 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.
  3. Download and Install the latest Android Studio.
  4. After the installation is done, open the Android Studio and click on SDK Manager
    Screenshot 2024-04-07 at 15 33 21
  5. Install SDK 33
    Screenshot 2024-04-07 at 15 30 28
  6. Then install Command Line Tools. It is required by Processing.
    Screenshot 2024-04-07 at 15 28 14
  7. Open the Processing App and choose to install Android Mode
    Screenshot 2024-04-07 at 15 35 58
  8. 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
  9. If you get no error, or warning, then you are good to go.
  10. 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.
    Screenshot 2024-04-07 at 16 09 06
  11. Hit Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants