Ravikant Gupta
Ravikant Gupta

Reputation: 205

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

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!

Upvotes: 2

Views: 2173

Answers (3)

Javier_Caceres
Javier_Caceres

Reputation: 48

When you run "flutter doctor --android-licenses to accept" but don´t receive the option to accept them, run 1) "flutter doctor --android-licenses -v" [ends in -v ] then 2) Run again "flutter doctor --android-licenses to accept" [no -v] Then you will have a chance to start accept options and just write "y" on all. 3) Run again flutter doctor This worked for me

Upvotes: 0

Juan Antonio Tub&#237;o
Juan Antonio Tub&#237;o

Reputation: 1191

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!

Upvotes: 0

ElsayedDev
ElsayedDev

Reputation: 650

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

Upvotes: 0

Related Questions