0
votes

I installed flutter SDK using ubuntu "snap" by running:

$ sudo snap install flutter --classic

and when i want to add PATH of flutter sdk to android studio i have a seroius problem !!

recently i searched flutter sdk paths and i saw some guys said , if you installed it with snap, this is sdk path:

/home/user_name/snap/flutter/common/flutter

then I checked this path and i saw in common directory i have a zip file and there is no flutter directory , i tried to unzip that file but it gives error and cannot unzip it.

please help me , please ....

1
Initializing Flutter Downloading https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_1.22.4-stable.tar.xz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 193 100 193 0 0 286 0 --:--:-- --:--:-- --:--:-- 285 tar: This does not look like a tar archive xz: (stdin): File format not recognized tar: Child returned status 1 tar: Error is not recoverable: exiting now Flutter initialization failed Could not find working copy of Flutter - Peyman.shabani
when i run flutter doctor command, it gives me this error - Peyman.shabani

1 Answers

1
votes

This problem happened to me, i solved it by uninstalling the flutter by snap and then following the installation on the website by downloading the .tar file

sudo snap remove flutter

After uninstalling the flutter with the snap follow the manual installation step of the link

https://flutter.dev/docs/get-started/install/linux