Flutter run error : You have not accepted the license agreements

前端 未结 12 2180
面向向阳花
面向向阳花 2020-12-03 17:04

I\'m developing android and ios app with Google flutter.
when I add a new dependency like shared_preferences to pubspec.yaml and then execute

12条回答
  •  旧巷少年郎
    2020-12-03 17:42

    I had java SE 11 installed and its variables set up.

    It somehow interfered with flutter!

    1. Double-check your java path entry. Go to your java environment variables and double-check your path entry. Keep one of them in the bin and remove the other.

      Mine:

      C:\Program Files\Java\jdk-11.0.8\bin
      C:\Program Files\Java\jdk-11.0.8
      
    2. In the command line just run flutter doctor --android-licenses accept everything (by clicking y key followed by enter key).

提交回复
热议问题