LoginSignup
1

More than 1 year has passed since last update.

【Flutter】プロジェクトをgit cloneしたらアプリが動かないときの対処法

Last updated at Posted at 2022-09-02

はじめに

Flutterのソースをgithubにあげて別端末でクローンして動かそうとしたら
「Target of URI doesn't exist 'package:flutter/material.dart'」とでてしまい
動かすことができなかったので調べてみた。

環境

Windows 11
VS Code 1.71.0
Flutter 3.3.0

解決策

コマンドプロンプトで動かしたいソースが入ったフォルダに移動し、以下のコマンドを実行してエディタを再起動する。

対処法
flutter pub get

参考資料

Visual Studio Code - Target of URI doesn't exist 'package:flutter/material.dart'

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1