error Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses". Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 code example
Example 1: Failed to install the following Android SDK packages as some licences have not been accepted.
> flutter doctor --android-licenses
Example 2: 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
Example 3: error Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager
Go to Configure>SDK Manager in your Android Studio.
Select SDK Tools tab and install Google Play Licensing Library