ansible android update sdk giving can't find sdkmanager.jar

Answer #1 100 %

As I see, you are trying to use the android executable at /opt/android-sdk-linux/tools/. Try using this, dropping the need of PATH

  name: "Install Android SDKs"
  shell: "/opt/android-sdk-linux/tools/android update sdk -u -a -t {{ item }}"
    - "tools"
    - "platform-tools"
    - "build-tools-23.0.1"
    - "build-tools-22.0.1"
    - "android-23"
    - "android-22"
    - "android-21"
    - "extra"
    executable: "/bin/bash"

Also I suggest using, the following as shell command to accept all the licenses.

  shell: "echo \"y\" | /opt/android-sdk-linux/tools/android update sdk -u -a -t {{ item }}"

You’ll also like:

© 2022 CodeForDev.com -