Com android sdklib tool sdkmanager sdkmanagercli

Содержание
  1. Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli #5304
  2. Comments
  3. atheistrepublic commented May 1, 2020
  4. krayanni commented May 4, 2020
  5. shad-1 commented Jun 7, 2020
  6. Asandax6 commented Jun 12, 2020
  7. JetErorr commented Jun 20, 2020
  8. SaiCodeWorld commented Jul 19, 2020 •
  9. andreban commented Jul 24, 2020
  10. Android SDK is not installed or is not configured properly, environment looks ok #3139
  11. Comments
  12. ItStillDoesNotWork commented Sep 28, 2017
  13. petekanev commented Sep 28, 2017
  14. rhanb commented Oct 2, 2017
  15. petekanev commented Oct 2, 2017
  16. rhanb commented Oct 3, 2017
  17. etabakov commented Oct 5, 2017
  18. GrumpyOldTroll commented Jan 19, 2018 •
  19. viotti commented Feb 7, 2018 •
  20. as-cole commented Mar 9, 2018
  21. germanviscuso commented Apr 3, 2018
  22. ericjasonthomas commented Jun 4, 2018
  23. lozinskydino commented Jan 11, 2019 •
  24. FindMeNerve commented Jan 25, 2019
  25. vadxq commented Feb 5, 2019
  26. mustafa-kahraman commented Mar 13, 2019
  27. maxjf1 commented May 22, 2019
  28. meleander commented Jul 30, 2019
  29. jburtondev commented Oct 12, 2019
  30. Krunal79-flutter commented Oct 15, 2019
  31. INotDisposable commented Oct 17, 2019
  32. vitormm commented Jan 15, 2020
  33. Arunaa2783 commented Oct 28, 2020
  34. kvnptl commented Oct 30, 2020 •
  35. meet-sumeet commented May 10, 2021
  36. noob975 commented May 20, 2021 •
  37. How To Fix Java.Lang.NoClassDefFoundError: Javax/xml/bind/annotation/xmlschema When Install Android SDK
  38. 1. Downgrade JDK Version To Fix Exception in thread “main” java.lang.NoClassDefFoundError:javax/xml/bind/annotation/XmlSchema Error.
  39. 2. Edit JAVA_OPTS Environment Variable Value To Fix Exception in thread “main” java.lang.NoClassDefFoundError:javax/xml/bind/annotation/XmlSchema Error.

Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli #5304

Comments

atheistrepublic commented May 1, 2020

Hi i am trying to install flutter and getting an error when i type sdkmanager —list in the command prompt .I have added the environment variables correctly.I am attaching the screenshots that shows this problem and also the environment variables i am using and my directory structure.I am trying to install command line tools only and not android studio.How can i solve this error?




The text was updated successfully, but these errors were encountered:

krayanni commented May 4, 2020

I think latest version ‘6200805’ has some issue, even I got the same problem.

Solution: Use the older sdkmanager version, please find below links for older version.

shad-1 commented Jun 7, 2020

Interestingly enough, downloading the older version from @krayanni ‘s link didn’t work for me at first. However, when I used 7zip instead of the default windows unzip tool, it worked for me.
After unzipping, I ran sdkmanager —android-licenses in terminal and replied y to confirm every update.

Asandax6 commented Jun 12, 2020

@shad-1 is right using 7zip to extract worked great. Windows zip manager must have an issue when extracting the files

JetErorr commented Jun 20, 2020

Interestingly enough, downloading the older version from @krayanni ‘s link didn’t work for me at first. However, when I used 7zip instead of the default windows unzip tool, it worked for me.
After unzipping, I ran sdkmanager —android-licenses in terminal and replied y to confirm every update.

This worked for me as well, I used the latest version though.

Читайте также:  Лучшие фотоаппараты для андроид

SaiCodeWorld commented Jul 19, 2020 •

Yes Use 7zip for the win!

andreban commented Jul 24, 2020

Here’s the link to the corresponding issue on the Android issue tracker: https://issuetracker.google.com/issues/154298380

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Android SDK is not installed or is not configured properly, environment looks ok #3139

Comments

ItStillDoesNotWork commented Sep 28, 2017

See #1813. This problem STILL EXISTS — despite that issue being closed for some reason — on Linux, and on Mac.

The text was updated successfully, but these errors were encountered:

petekanev commented Sep 28, 2017

@ItStillDoesNotWork please follow the issue template when filing an issue.

Make sure you have all the required Android SDK packages installed too, these include SDK Platform 25, Android SDK Build-Tools 25.0.2 or later, Android Support Repository, Google Repository and any other SDKs that you may need.

rhanb commented Oct 2, 2017

Got the same issue when updating NativeScript to 3.2.1, I think it comes from the script installation which does everything for you and change your bash_profile.. A lots of MacOsX users use Zsh it may comes from this.
(javac works in the terminal)

get an error while executing:

when updating I also got this errors:

Hope it can help

petekanev commented Oct 2, 2017

Hey @rhanb which JDK distribution do you have? Please make sure it’s Oracle’s 1.8 (Java 8) JDK.

rhanb commented Oct 3, 2017

Thanks for your answer, I used the latest JDK which was downloaded from the NativeScript script which run when I updated it. Using Java 8 SDK fixed the issue 👍

etabakov commented Oct 5, 2017

Hi @rhanb, the setup script was updated to require explicitly Java 8 and the documentation was updated accordingly.

GrumpyOldTroll commented Jan 19, 2018 •

Namely:
replacing line 31 of $ANDROID_HOME/tools/bin/sdkmanager:

viotti commented Feb 7, 2018 •

Or just export JAVA_OPTS=’-XX:+IgnoreUnrecognizedVMOptions —add-modules java.se.ee’ . On Bash, YMMV.

as-cole commented Mar 9, 2018

I am getting the exact same behavior as rhanb described above, but I am on JDK 8 (1.8), and I have tried the fix GrumpyOldTroll offered — still getting the same errors.

germanviscuso commented Apr 3, 2018

Android Tools are not yet compatible with JDK 9 or 10 and by taking a look at the XmlSchema error it looks like at some point the system is using the system-wide JDK version. If you have to work with multiple Java versions (and just having a JDK 8 is not an option) you can try this: https://stackoverflow.com/questions/49630165/how-to-configure-unity-2017-4-to-target-android-and-avoid-build-failures-on-osx/49630166#49630166
(I work with multiple Java versions via jenv and this was the only sane solution I found)

ericjasonthomas commented Jun 4, 2018

Getting same issue

lozinskydino commented Jan 11, 2019 •

I using the currenty version of tns (5.1.0), and i solved the problem removing «—add-modules java.se.ee'»

Thanks to @GrumpyOldTroll for the path to solve this.

FindMeNerve commented Jan 25, 2019

I using the currenty version of tns (5.1.0), and i solved the problem removing «—add-modules java.se.ee'»

Thanks to @GrumpyOldTroll for the path to solve this.

Читайте также:  Title 403 forbidden code 111 андроид

vadxq commented Feb 5, 2019

I use it in windows:

mustafa-kahraman commented Mar 13, 2019

I solved the problem on Linux

  • mov the sdk files to home folder like /home/user_name/android/sdk
  • change ANDROID_HOME path with the new path ( in .bashrc file and source it or reopen the terminal )
  • call the same command without sudo
    $ANDROID_HOME/tools/bin/sdkmanager «tools» «emulator» «platform-tools» «platforms;android-28» «build-tools;28.0.3» «extras;android;m2repository» «extras;google;m2repository»

maxjf1 commented May 22, 2019

i solved it downgrading to java 8

meleander commented Jul 30, 2019

jburtondev commented Oct 12, 2019

Just downgrade your Java version to Java 8 using this: sudo update-alternatives —config java 👍

Krunal79-flutter commented Oct 15, 2019

Already Solved At Here

INotDisposable commented Oct 17, 2019

I don’t understand why Oracle removed (or just moved) the XmlSchema classes. For anyone with a modern version of Java installed this error exists. Also, at least for Windows, you can’t download JDK 8 anymore without signing up for an Oracle account.

Once JDK 8 is installed this all seems to work. Unfortunately, I need a newer release of Java for other workloads, so I keep needing to adjust JAVA_HOME and my PATH depending on what I’m doing at the time. Hopefully these tools will be updated to remove the dependency on JDK8.

vitormm commented Jan 15, 2020

Just downgrade your Java version to Java 8 using this: sudo update-alternatives —config java

It solved here! Thanks!

Arunaa2783 commented Oct 28, 2020

Am facing the same issue while upgrading licenses in flutter doctor
help me please to solve this..Thanks in Advance

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:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
. 5 more

kvnptl commented Oct 30, 2020 •

I have faced two errors while Build my project on Android Studio:

License for package Android SDK Platform 28 not accepted. (while Build my project in Android Studio 4.1)

exception in thread main java.lang.noclassdeffounderror javax/xml/bind/annotation/xmlschema (while running SDK manager to accept license)

For me, it was a java version problem. I have installed JDK instead of java. TO SOLVE THE ISSUE, I did the following steps.

For Windows:

Step1: Download and install the latest JAVA version from https://www.java.com/en/download/

Step2: Search for «View advanced system settings» in the start menu button (windows icon)

Step3: Click on «Environment Variables»

Step4: under «System variables» click on «New», now set » Variable name: JAVA_HOME » and » Variable value: C:\Program Files\Java\jre1.8.0_271 » (add latest installed java path here). Then «OK», «OK», and «OK».

Step5: open cmd as an administrator and type the following commands:

cd C:\Users\kevin\AppData\Local\Android\Sdk\tools\bin (*change username here)

Press «y» for all questions.

Step6: Restart your Android Studio again.

Let me know if anyone having a problem while following the above steps.

meet-sumeet commented May 10, 2021

Am facing the same issue while upgrading licenses in flutter doctor
help me please to solve this..Thanks in Advance

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:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
. 5 more

Читайте также:  Андроид как мышь для планшета

Were you able to get any solution to this. I am getting the same error message in mac when I run
flutter doctor —android-licenses

noob975 commented May 20, 2021 •

I have faced two errors while Build my project on Android Studio:

  1. License for package Android SDK Platform 28 not accepted. (while Build my project in Android Studio 4.1)
  2. exception in thread main java.lang.noclassdeffounderror javax/xml/bind/annotation/xmlschema (while running SDK manager to accept license)

For me, it was a java version problem. I have installed JDK instead of java. TO SOLVE THE ISSUE, I did the following steps.

For Windows:

Step1: Download and install the latest JAVA version from https://www.java.com/en/download/

Step2: Search for «View advanced system settings» in the start menu button (windows icon)

Step3: Click on «Environment Variables»

Step4: under «System variables» click on «New», now set » Variable name: JAVA_HOME » and » Variable value: C:\Program Files\Java\jre1.8.0_271 » (add latest installed java path here). Then «OK», «OK», and «OK».

Step5: open cmd as an administrator and type the following commands:

  1. cd C:\Users\kevin\AppData\Local\Android\Sdk\tools\bin (*change username here)
  2. sdkmanager —licenses

Press «y» for all questions.

Step6: Restart your Android Studio again.

Let me know if anyone having a problem while following the above steps.

This worked on May 2021. Had to install Java 8.0.291 (latest at that time) and run the commands (for some reason, I had to use Program Files x86 instead of Program Files). Thanks

Источник

How To Fix Java.Lang.NoClassDefFoundError: Javax/xml/bind/annotation/xmlschema When Install Android SDK

When I install android SDK use android SDK manager, it throws an error exception in thread “main” java.lang.noclassdeffounderror: javax/xml/bind/annotation/xmlschema . It cost me a lot of time to investigate. Now I will tell you how to fix it in detail.

1. Downgrade JDK Version To Fix Exception in thread “main” java.lang.NoClassDefFoundError:javax/xml/bind/annotation/XmlSchema Error.

The reason for this error is because the JDK version that is used is too new. So first you need to find out which Java version are you using.

  1. Open a terminal and run the command $ java -version like below.
  2. My java version is 12.0.1, this java version will cause this error, so I need to install another java version such as java 8 and then set java 8 as my default java JDK. You can read the article How To Install / Uninstall Multiple Java Versions In Mac OS By Home Brew Or Manually to learn more.
  3. When you install java 8 successfully, run the command ./sdkmanager in terminal again, then the error will disappear.

2. Edit JAVA_OPTS Environment Variable Value To Fix Exception in thread “main” java.lang.NoClassDefFoundError:javax/xml/bind/annotation/XmlSchema Error.

If you do not want to downgrade your JDK version, you can edit the environment variable JAVA_OPTS value like below to fix this error.

  1. For Windows, you can run the below command in a command console to set the system environment variable JAVA_OPTS. Please read the article How To Set Windows Environment Variables.
  2. For Linux or macOS, edit file .bash_rc or .zshrc ( Linux ), .bash_profile ( macOS ), add below code to export the system environment variable JAVA_OPTS.

Источник

Оцените статью