Trouble connecting Android Mode 4.0 to Sdk

Hello!

I had an old version of Android Mode working fine, but when I upgraded to 4.0, Processing could get set up with the Android Sdk. I am using Processing version 3.3.6.

  • I installed API 26 and its build tools
  • I followed the steps on [https://forum.processing.org/one/topic/android-problems.html](this forum page) including setting environment variables and updating JDK
  • When I manually changed preferences.txt to have android.sdk.path=[my path], Processing complains "Processing found an Android SDK, but is not valid. It could be missing some files, or might not be including the required platform for API 26."
  • Otherwise, it simply complains "Processing did not find an Android SDK on this computer."
  • If I locate the path manually it says the SDK could not be loaded
  • I even tried "Download SDK automatically". The download finished, and Processing said the SDK could not be loaded. I tried locating the SDK manually to where Processing had just downloaded it, and got the same error

I took a look at [https://forum.processing.org/two/discussion/12665/android-sdk-could-not-be-loaded](this post), but nothing there seemed to help.

Surely, there is something I am missing. Can anyone identify what I am doing wrong? Thank you very much in advance!

Tagged:

Answers

  • Got it working!

    If you are running into this issue, here's how I solved it:

    • Though I already had an SDK via Android Studio, I downloaded the "just command line tools" via the link provided by Processing (https://developer.android.com/studio/index.html#downloads)
    • In the command prompt, I navigated to the extracted folder /tools/bin
    • I ran the following commands to install the necessary resources: sdkmanager "build-tools;26.0.0" sdkmanager "platform-tools" "platforms;android-26" sdkmanager "extras;android;m2repository" sdkmanager "extras;google;m2repository"
    • I changed the preferences.txt file for Processing to have android.sdk.path=[path to the extracted folder]

    Hurray!

  • Just tried your solution, and it didn't work with "just command line tools", however it did work with these command line tools which were inside of full SDK from Android Studio. Thank you.

Sign In or Register to comment.