0

Running flutter create testapp while following the Flutter first example tutorial gives me Could not find a file named "pubspec.yaml" in "C:\Users\<username>\Desktop" where <username> is my username. The solutions here and here do not work because I am not manually cloning with git nor am I on Unix. I am on Windows 10 with flutter --version returning

fatal: not a git repository (or any of the parent directories): .git
Building flutter tool...
Running pub upgrade...
Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (4 weeks ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

and the full error message of flutter create testapp giving

fatal: not a git repository (or any of the parent directories): .git
Building flutter tool...
Running pub upgrade...
Creating project testapp...
  testapp\.gitignore (created)
  testapp\.idea\libraries\Dart_SDK.xml (created)
  testapp\.idea\libraries\Flutter_for_Android.xml (created)
  testapp\.idea\libraries\KotlinJavaRuntime.xml (created)
  testapp\.idea\modules.xml (created)
  testapp\.idea\runConfigurations\main_dart.xml (created)
  testapp\.idea\workspace.xml (created)
  testapp\.metadata (created)
  testapp\android\app\build.gradle (created)
  testapp\android\app\src\main\java\com\example\testapp\MainActivity.java (created)
  testapp\android\build.gradle (created)
  testapp\android\testapp_android.iml (created)
  testapp\android\app\src\debug\AndroidManifest.xml (created)
  testapp\android\app\src\main\AndroidManifest.xml (created)
  testapp\android\app\src\main\res\drawable\launch_background.xml (created)
  testapp\android\app\src\main\res\mipmap-hdpi\ic_launcher.png (created)
  testapp\android\app\src\main\res\mipmap-mdpi\ic_launcher.png (created)
  testapp\android\app\src\main\res\mipmap-xhdpi\ic_launcher.png (created)
  testapp\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png (created)
  testapp\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png (created)
  testapp\android\app\src\main\res\values\styles.xml (created)
  testapp\android\app\src\profile\AndroidManifest.xml (created)
  testapp\android\gradle\wrapper\gradle-wrapper.properties (created)
  testapp\android\gradle.properties (created)
  testapp\android\settings.gradle (created)
  testapp\ios\Runner\AppDelegate.h (created)
  testapp\ios\Runner\AppDelegate.m (created)
  testapp\ios\Runner\main.m (created)
  testapp\ios\Runner.xcodeproj\project.pbxproj (created)
  testapp\ios\Runner.xcodeproj\xcshareddata\xcschemes\Runner.xcscheme (created)
  testapp\ios\Flutter\AppFrameworkInfo.plist (created)
  testapp\ios\Flutter\Debug.xcconfig (created)
  testapp\ios\Flutter\Release.xcconfig (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Contents.json (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-1024x1024@1x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@1x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@2x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@3x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@1x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@2x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@3x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@1x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@2x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@3x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-60x60@2x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-60x60@3x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-76x76@1x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-76x76@2x.png (created)
  testapp\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-83.5x83.5@2x.png (created)
  testapp\ios\Runner\Assets.xcassets\LaunchImage.imageset\Contents.json (created)
  testapp\ios\Runner\Assets.xcassets\LaunchImage.imageset\LaunchImage.png (created)
  testapp\ios\Runner\Assets.xcassets\LaunchImage.imageset\LaunchImage@2x.png (created)
  testapp\ios\Runner\Assets.xcassets\LaunchImage.imageset\LaunchImage@3x.png (created)
  testapp\ios\Runner\Assets.xcassets\LaunchImage.imageset\README.md (created)
  testapp\ios\Runner\Base.lproj\LaunchScreen.storyboard (created)
  testapp\ios\Runner\Base.lproj\Main.storyboard (created)
  testapp\ios\Runner\Info.plist (created)
  testapp\ios\Runner.xcodeproj\project.xcworkspace\contents.xcworkspacedata (created)
  testapp\ios\Runner.xcworkspace\contents.xcworkspacedata (created)
  testapp\lib\main.dart (created)
  testapp\testapp.iml (created)
  testapp\pubspec.yaml (created)
  testapp\README.md (created)
  testapp\test\widget_test.dart (created)
Could not find a file named "pubspec.yaml" in "C:\Users\arkj7\Desktop".
Running "flutter packages get" in testapp...
pub get failed (66)
nedla2004
  • 1,115
  • 3
  • 14
  • 29
  • You're running your command on the wrong folder. You need probably need to be in Desktop/testapp – Rémi Rousselet Mar 16 '19 at 20:47
  • @RémiRousselet I am running this command where I want the app to be created (in this case my Desktop.) It creates a new directory with the name of the project, (`testapp`) but `flutter run` does not recognize it as Flutter project. Is there something I'm missing? – nedla2004 Mar 16 '19 at 21:17
  • As I said, you shouldn't run `flutter run` in the `Desktop` folder, but inside `testapp` – Rémi Rousselet Mar 16 '19 at 21:18
  • @RémiRousselet Sorry I didn't make this clear, but `flutter run` is the only command being run inside `testapp`. It still fails. – nedla2004 Mar 16 '19 at 21:19

0 Answers0