0

When running flutter project, here comes the warning:

Checking the license for package SDK Patch Applier v4 in E:\platform-tools_r31.0.3-windows\licenses
Warning: License for package SDK Patch Applier v4 not accepted.
Checking the license for package Android Emulator in E:\platform-tools_r31.0.3-windows\licenses
Warning: License for package Android Emulator not accepted.
Checking the license for package Android SDK Tools in E:\platform-tools_r31.0.3-windows\licenses
Warning: License for package Android SDK Tools not accepted.
Checking the license for package Android SDK Build-Tools 29.0.2 in E:\platform-tools_r31.0.3-windows\licenses
Warning: License for package Android SDK Build-Tools 29.0.2 not accepted.
Checking the license for package Android SDK Platform 31 in E:\platform-tools_r31.0.3-windows\licenses
Warning: License for package Android SDK Platform 31 not accepted.

But I find that there isn't a package named E:\platform-tools_r31.0.3-windows\licenses, just like the picture enter image description here

So what could be the problem? And how to solve it? Thanks for your help.

yamato
  • 85
  • 1
  • 13

1 Answers1

1

Android SDK path of your flutter project is not defined..

Define it with

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

Narendra_Nath
  • 4,578
  • 3
  • 13
  • 31
  • Thanks for your anwser. But I used another way, that is creating a folder named licenses in platform-tools, and then copying the licenses in SDK to it. It works. – yamato Mar 17 '22 at 23:51