4

I got following error when I run "flutter doctor --android-licenses" command

A newer version of the Android SDK is required. To update, run:
/Users/taleb/Library/Android/sdk/tools/bin/sdkmanager --update

notice:

 * my android SDK is updated
 * I added all of the paths to 'bash_profile' (mac)

this is my 'bash_profile'

export PATH="$PATH:/⁨Users⁩/taleb⁩/Library/Android⁩/sdk⁩/platform-tools"
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools⁩
export PATH=$PATH:$ANDROID_HOME/platform-tools⁩
export PATH="$PATH:/Users/taleb/Developer/flutter/bin"

I also run "sdkmanager --update" command but I got the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
    at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
    at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
    at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(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:602)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 5 more

1 Answer 1

4

Open android studio, tools >> SDK manager >> SDK Platforms and then download the platform that has API Level of (29) and then click Apply. After that run flutter doctor

screenshot of SDK manager

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.