Android Studio installs without sdkmanager

后端 未结 4 1249
既然无缘
既然无缘 2020-12-03 13:36

I\'ve been programming in Flutter using macOS 10.15.3, targeting iOS devices. Today I tried installing Android Studio also, to branch out. The installation went without erro

4条回答
  •  感情败类
    2020-12-03 14:16

    If you are using Java 11 or higher, you just you need jaxb libraries which are not included in JDK 11/12 when it runs (especially on Win 10).

    Follow the below steps:

    1. Download wget tool from the location -> https://eternallybored.org/misc/wget/ and set the environment variable path in your computer to run wget command in cmd prompt

    2. Locate your Android SDSK\tools folder (\tools) and change directory to it with the cd command: cd \tools

    3. Execute the below commands inside the tools folder:

      mkdir jaxb_lib

      wget https://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.jar -O jaxb_lib/activation.jar

      wget https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-xjc/2.3.2/jaxb-xjc-2.3.2.jar -O jaxb_lib/jaxb-xjc.jar

      wget https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar -O jaxb_lib/jaxb-core.jar

      wget https://repo1.maven.org/maven2/org/glassfish/jaxb/jaxb-jxc/2.3.2/jaxb-jxc-2.3.2.jar -O jaxb_lib/jaxb-jxc.jar

      wget https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar -O jaxb_lib/jaxb-api.jar

      wget https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.3.2/jaxb-impl-2.3.2.jar -O jaxb_lib/jaxb-impl.jar

      wget https://repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar -O jaxb_lib/istack-commons-runtime.jar

    4. Goto the \tools\bin folder and edit sdkmanager.bat and avdmanager.bat files with your favourite text editor (notepad will do).

    5. Paste the below code before the statement ‘@rem Execute sdkmanager’ to set classpath.

      set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb_lib\jaxb-api.jar set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb_lib\jaxb-core.jar set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb_lib\jaxb-impl.jar set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb_lib\jaxb-jxc.jar set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb_lib\jaxb-xjc.jar set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb_lib\activation.jar set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb_lib\istack-commons-runtime.jar

    6. Finally execute: \tools\bin\sdkmanager --update

    We are all done. Now run flutter doctor and now your android license status error should go away. Cheers!!!

提交回复
热议问题