Mani murugan
Mani murugan

Reputation: 1802

Not able to run Flutter Project in Android Emulator or Android Physical Device

I am using Android Studio in Mac. When I try to run my newly created sample flutter project in Android Emulator , I am getting below Error.

Checking the license for package SDK Patch Applier v4 in /usr/local/Caskroom/android-platform-tools/29.0.5/licenses

Warning: License for package SDK Patch Applier v4 not accepted.

Checking the license for package Android Emulator in /usr/local/Caskroom/android-platform-tools/29.0.5/licenses

Warning: License for package Android Emulator not accepted.

Checking the license for package Android SDK Tools in /usr/local/Caskroom/android-platform-tools/29.0.5/licenses

Warning: License for package Android SDK Tools not accepted.

Checking the license for package Android SDK Build-Tools 28.0.3 in /usr/local/Caskroom/android-platform-tools/29.0.5/licenses

Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.

Checking the license for package Android SDK Platform 28 in /usr/local/Caskroom/android-platform-tools/29.0.5/licenses

Warning: License for package Android SDK Platform 28 not accepted.

FAILURE: Build failed with an exception.

When I open android module from flutter project like this Image(Open Android Module in Android Studio),

enter image description here

Then New Android Studio window opened with Android Module of this sample project. I am able to run this android module project into emulator without any problem. I wonder why android studio is giving this error when I directly run from flutter project of same android module.

Note : All license for all android SDK packages are accepted

Upvotes: 1

Views: 671

Answers (1)

Mani murugan
Mani murugan

Reputation: 1802

Android SDK path of my flutter was not defined.. Once I change my flutter android sdk path using below command

flutter config --android-sdk 'My SDK Path'

Everything works well.. Now I am able to run in android emulator.

Upvotes: 2

Related Questions