Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;28.0.3 Android SDK Build-Tools 28.0.3 code example

Example 1: MatDatepicker: No provider found for DateAdapter. You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a custom implementation

import {MatNativeDateModule} from '@angular/material';

Example 2: Failed to install the following Android SDK packages as some licences have not been accepted.

# macos:
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
yes | ~/Library/Android/sdk/tools/bin/sdkmanager --licenses

# windows:
%ANDROID_HOME%/tools/bin/sdkmanager --licenses

# GNU/Linux Distributions:
yes | ~/Android/Sdk/tools/bin/sdkmanager --licenses

Example 3: Compilation is not supported for following modules: android. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project

save .idea folder somewhere else (for backup)
remove .idea folder
start AndroidStudio
select project
[there may be an error, ignore that]
click File -> Invalidate Caches/ Restart
click button: Invalidate Caches/ Restart
resolved

Example 4: Failed to install the following Android SDK packages as some licences have not been accepted.

> flutter doctor --android-licenses

Example 5: Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;28.0.3 Android SDK Build-Tools 28.0.3 platforms;android-29 Android SDK Platform 29

%ANDROID_HOME%/tools/bin/sdkmanager --licenses

Tags:

Java Example