The "android" command is deprecated. Mac Os

Viewed 598

I am new to Android development and trying to get my Mac set up but keep running into various issues.

I have found many similar issues online and there suggested solutions which normally involve using homebrew or updating export paths in the bash_rc file.

As I use ZSH I have been adding these paths to my .zshrc file and have used various combinations of the path as I have found online.

Most of the resources I have found online including Udemy and youtube and ofc forums like this have solutions that 'appear' to be outdated.

Here's my setup and errors I am getting.

Mac running 10.14.5 (Mojave) Using terminal/iterm2 with ZSH. Node v12.0 npm 6.9.0 javac 12.0.1

Android Debug Bridge version 1.0.41 Version 29.0.1-5644136 Installed as /Users/serdarmustafa/Library/Android/sdk/platform-tools/adb

When I run android, I get:

The "android" command is deprecated.

For manual SDK, AVD, and project management, please use Android Studio. For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager


Invalid or unsupported command ""

Supported commands are: android list target android list avd android list device android create avd android move avd android delete avd android list sdk android update sdk

I have tried following these instrctions from the cmd line and through finder but neither respond. From the finder it opens up the terminal with a fresh tab and just refreshes.

Alternatively, direct from the cmd line I get:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156) at com.android.repository.api.SchemaModule.(SchemaModule.java:75) at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 5 more

I have created a sample app using cordova create but the next step to 'build', returns this error.

Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=/usr/local/Caskroom/android-sdk/4333796 (DEPRECATED) Requirements check failed for JDK 8 ('1.8.*')! Detected version: 12.0.1 Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.

  • These are the different paths I have tried, each time restarting the terminal.

Does anyone have any proposed solutions or help that they can provide?

Sorry if my questions are not posed correctly or too vague. Please feel free to correct me or direct me to a solution already available online that I may have missed.

Thanks in advance for any help you can provide.

0 Answers
Related