6 of 7 SDK package licenses not accepted. 100% Computing updates

Viewed 1304

I'm trying to run the command flutter doctor --android-licenses to accept the SDK package license but I'm getting this message

C:\Users\Administrator\AndroidStudioProjects\flutter_app>flutter doctor --android-licenses

6 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)?

When I tried to run the application

C:\Users\Administrator\AndroidStudioProjects\flutter_app>flutter run
Launching lib\main.dart on SM J610F in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        61.2s
Exception: Gradle task assembleDebug failed with exit code -1

I tried to run the command in cmd

C:\Users\Administrator\AppData\Local\Android\Sdk\tools\bin>sdkmanager.bat --licenses

but getting below 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:522)
        ... 5 more

I am looking for a solution. Do you have any ideas?

Thanks!

2 Answers

just delete this version and try installing another, Then verify that you have added the correct path in your Environment Variables

You only have to press 'y' to answer 'yes' to the question and you'll get some screens with the license content that have been not accepted yet. Press 'y' again to accept it and that's all!

Related