Skip to main content
Remove incorrect automatic Java syntax highlighting
Source Link
Benjamin Loison
  • 5.8k
  • 4
  • 20
  • 37

I ran into same issue when running:

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"_ 
$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"_ 

I solved it as

$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home $ ls /Library/Java/JavaVirtualMachines/ jdk-11.0.1.jdk jdk1.8.0_202.jdk 
$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home $ ls /Library/Java/JavaVirtualMachines/ jdk-11.0.1.jdk jdk1.8.0_202.jdk 

Change Java to use 1.8

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home' 
$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home' 

Then the same command runs fine

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3" 
$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3" 

I ran into same issue when running:

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"_ 

I solved it as

$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home $ ls /Library/Java/JavaVirtualMachines/ jdk-11.0.1.jdk jdk1.8.0_202.jdk 

Change Java to use 1.8

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home' 

Then the same command runs fine

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3" 

I ran into same issue when running:

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"_ 

I solved it as

$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home $ ls /Library/Java/JavaVirtualMachines/ jdk-11.0.1.jdk jdk1.8.0_202.jdk 

Change Java to use 1.8

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home' 

Then the same command runs fine

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3" 
Some formatting.
Source Link
jww
  • 103.6k
  • 107
  • 453
  • 975

RanI ran into same issue when running:

$ /Users//Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"_ 

SolvedI solved it as $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home

$ ls /Library/Java/JavaVirtualMachines/

jdk-11.0.1.jdk
jdk1.8.0_202.jdk

$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home $ ls /Library/Java/JavaVirtualMachines/ jdk-11.0.1.jdk jdk1.8.0_202.jdk 

Change Java to use 1.8

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home'

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home' 

Then the same command runs fine $ /Users//Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3" 

Ran into same issue when running

$ /Users//Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"

Solved it as $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home

$ ls /Library/Java/JavaVirtualMachines/

jdk-11.0.1.jdk
jdk1.8.0_202.jdk

Change Java to use 1.8

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home'

Then the same command runs fine $ /Users//Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"

I ran into same issue when running:

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"_ 

I solved it as

$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home $ ls /Library/Java/JavaVirtualMachines/ jdk-11.0.1.jdk jdk1.8.0_202.jdk 

Change Java to use 1.8

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home' 

Then the same command runs fine

$ /Users/<username>/Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3" 
Source Link
Sandeep
  • 356
  • 5
  • 9

Ran into same issue when running

$ /Users//Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"

Solved it as $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home

$ ls /Library/Java/JavaVirtualMachines/

jdk-11.0.1.jdk
jdk1.8.0_202.jdk

Change Java to use 1.8

$ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home'

Then the same command runs fine $ /Users//Library/Android/sdk/tools/bin/sdkmanager "platforms;android-28" "build-tools;28.0.3"