Android Studio stuck when creating new Flutter project

前端 未结 11 915
后悔当初
后悔当初 2021-01-17 12:52

I have installed Flutter on Windows and checked all is ok using flutter doctor. I imported the Flutter plugin.

Now, when I try to create a new Flutter app via Anroid

相关标签:
11条回答
  • 2021-01-17 13:31

    This is likely because you've put Flutter in Program Files which requires admin permissions to be able to write its cache files.

    I've got a PR Open that should result in a more friendly error, but I'd recommend moving Flutter away to a folder that non-Admin users can write to.

    0 讨论(0)
  • 2021-01-17 13:31

    For me this worked in Windows 10 :

    • Flutter SDK location : kept it under c:\Users<username>\AppData\Local
    • Project location : kept it under c:\Users<username>\AppData\Local
    • Start Android Studio in Administrator mode : this was not required it worked without Administrator privilege
    • While creating the new Flutter project : create project offline choose this option (another answer in this same post which has a screenshot says, do not select it, but for me it worked only after selecting this option)

    How much time it took to create the project ? 2 minutes

    0 讨论(0)
  • 2021-01-17 13:35

    in windows try to run android studio as administrator and create new flutter project

    0 讨论(0)
  • 2021-01-17 13:38

    I was struck with the same problem a while back. After a lot of stumbling I got it right. First of all delete your previous cloned flutter files and install git in your user folder. Like C:\users\username\

    Clone flutter in your git directory,set the path C:\users\username\git\flutter\bin

    Now use the command flutter doctor If you have android studio and intellij IDE, install flutter plugins in both of them and now create a new project.

    You are all set to go

    0 讨论(0)
  • 2021-01-17 13:39

    Had the same issue.

    Just run Android Studio/IntelliJ in administrator mode. It works.

    0 讨论(0)
  • 2021-01-17 13:42

    In my case this was the issue - I checked create project offline checkbox. Please sure that this checkbox is unchecked.

    0 讨论(0)
提交回复
热议问题