Skip to content

Flutter cannot create new project using new->flutter project #18190

Closed

Description

@androidappfarm

Steps to Reproduce

  1. From androidstudio file->new flutter project (note - just installed flutter sdk and plugin in androidstudio, and trying to create project for first time)
  2. ...
  3. ...

Logs

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

## command

flutter --no-color create --template app --description A new Flutter application. --org miketheandroidfarmer.com flutter_appxx

## exception

VersionCheckError: VersionCheckError: Command exited with code -1073741515: git log -n 1 --pretty=format:%ad --date=iso
Standard error: 


#0      _runSync (package:flutter_tools/src/version.dart:439)
#1      FlutterVersion._latestGitCommitDate (package:flutter_tools/src/version.dart:129)
#2      FlutterVersion.frameworkCommitDate (package:flutter_tools/src/version.dart:120)
#3      FlutterVersion.checkFlutterVersionFreshness (package:flutter_tools/src/version.dart:235)
<asynchronous suspension>
#4      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284)
<asynchronous suspension>
#5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#6      _rootRun (dart:async/zone.dart:1126)
#7      _CustomZone.run (dart:async/zone.dart:1023)
#8      runZoned (dart:async/zone.dart:1501)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:265)
<asynchronous suspension>
#11     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#12     new Future.sync (dart:async/future.dart:222)
#13     CommandRunner.run (package:args/command_runner.dart:109)
#14     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:174)
#15     run.<anonymous closure> (package:flutter_tools/runner.dart:54)
<asynchronous suspension>
#16     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#17     _rootRun (dart:async/zone.dart:1126)
#18     _CustomZone.run (dart:async/zone.dart:1023)
#19     runZoned (dart:async/zone.dart:1501)
#20     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#21     runInContext (package:flutter_tools/src/context_runner.dart:43)
<asynchronous suspension>
#22     run (package:flutter_tools/runner.dart:49)
#23     main (package:flutter_tools/executable.dart:49)
<asynchronous suspension>
#24     main (file:///C:/Users/Mike/flutter_sdk/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#25     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#26     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

flutter doctor

encountered exception: VersionCheckError: Command exited with code -1073741515: git log -n 1 --pretty=format:%ad --date=iso
Standard error: 

#0      _runSync (package:flutter_tools/src/version.dart:439)
#1      FlutterVersion._latestGitCommitDate (package:flutter_tools/src/version.dart:129)
#2      FlutterVersion.frameworkCommitDate (package:flutter_tools/src/version.dart:120)
#3      FlutterVersion.frameworkDate (package:flutter_tools/src/version.dart:83)
#4      _FlutterValidator.validate (package:flutter_tools/src/doctor.dart:282)
<asynchronous suspension>
#5      Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:88)
#6      Doctor.diagnose (package:flutter_tools/src/doctor.dart:145)
<asynchronous suspension>
#7      _doctorText.<anonymous closure> (package:flutter_tools/runner.dart:189)
#8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#9      _rootRun (dart:async/zone.dart:1126)
#10     _CustomZone.run (dart:async/zone.dart:1023)
#11     runZoned (dart:async/zone.dart:1501)
#12     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#13     _doctorText (package:flutter_tools/runner.dart:188)
<asynchronous suspension>
#14     _createLocalCrashReport (package:flutter_tools/runner.dart:166)
<asynchronous suspension>
#15     _handleToolError (package:flutter_tools/runner.dart:121)
<asynchronous suspension>
#16     run.<anonymous closure> (package:flutter_tools/runner.dart:58)
<asynchronous suspension>
#17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#18     _rootRun (dart:async/zone.dart:1126)
#19     _CustomZone.run (dart:async/zone.dart:1023)
#20     runZoned (dart:async/zone.dart:1501)
#21     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#22     runInContext (package:flutter_tools/src/context_runner.dart:43)
<asynchronous suspension>
#23     run (package:flutter_tools/runner.dart:49)
#24     main (package:flutter_tools/executable.dart:49)
<asynchronous suspension>
#25     main (file:///C:/Users/Mike/flutter_sdk/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#26     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

[√] Flutter (Channel beta, v0.4.4, on Microsoft Windows [Version 6.1.7601], lo
cale en-US)
    ΓÇó Flutter version 0.4.4 at C:\Users\Mike\flutter_sdk\flutter
    ΓÇó Framework revision f9bb4289e9 (3 weeks ago), 2018-05-11 21:44:54 -0700
    ΓÇó Engine revision 06afdfe54e
    ΓÇó Dart version 2.0.0-dev.54.0.flutter-46ab040e58

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    ΓÇó Android SDK at C:\Users\Mike\AppData\Local\Android\sdk
    ΓÇó Android NDK location not configured (optional; useful for native profili
ng support)
    ΓÇó Platform android-27, build-tools 27.0.3
    ΓÇó Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    ΓÇó Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b
02)
    ΓÇó All Android licenses accepted.

[√] Android Studio (version 3.1)
    ΓÇó Android Studio at C:\Program Files\Android\Android Studio
    ΓÇó Flutter plugin version 25.0.1
    ΓÇó Dart plugin version 173.4700
    ΓÇó Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b
02)

[√] Connected devices (1 available)
    ΓÇó SM G935V ΓÇó 16bc8ac0 ΓÇó android-arm64 ΓÇó Android 7.0 (API 24)

ΓÇó No issues found!


Activity

  1. YourFavouriteOreo commented on Jun 5, 2018

    @YourFavouriteOreo

    Have you tried re-installing flutter out of curiosity? Something may have gone wrong when installing it ?

    Specifically the flutter tools branch

  2. androidappfarm commented on Jun 8, 2018

    @androidappfarm
    Author

    thanks for replying, yes, I've tried reinstalling it. What I've found is that I also had to install git as a prereq and when I run git from command prompt I'm missing a dll libiconv-2.dll. Once I figure that out I think it'll fix this issue and i'll close this

  3. YourFavouriteOreo commented on Jun 8, 2018

    @YourFavouriteOreo

    It seems that quite a few people have this . Found this on stackoverflow

    https://stackoverflow.com/questions/3431361/git-for-windows-the-program-cant-start-because-libiconv2-dll-is-missing

    Good luck!

  4. androidappfarm commented on Jun 8, 2018

    @androidappfarm
    Author
  5. YourFavouriteOreo commented on Jun 8, 2018

    @YourFavouriteOreo

    Hmm, Okay I am curios firstly on whether it is the android SDK or flutter .

    Can you try creating a flutter project via cmd?

    flutter create app_name

    Wait , never mind one second. I am understanding the error now . Hmm , can we chat? I wanna help you get started up . Flutter is an amazing framework that deserves the attention

  6. androidappfarm commented on Jun 8, 2018

    @androidappfarm
    Author

    yeah, i'm disappointed, I've been developing Android native apps for years and wanted to move some of them to iOS. I've tried everything I can think of though... haven't heard anything from git though

  7. androidappfarm commented on Jun 9, 2018

    @androidappfarm
    Author

    OMG, finally got it to work. Solution that worked for me was to move C:\Program Files\Git\cmd to first item in windows PATH. Originally this was the last item and path had things like java, powershell, flutter and all Android stuff in front of it. I thought of this because when I ran git from powershell it worked but when I ran from cmd it didn't so there must be some libiconv-2.dll that is found before the one in git.

    Special thanks to YourFavouriteOreo who kept egging me on when I was ready to quit trying from frustration! Now on to make my first app which I'm pretty sure I'd already have working if I hadn't spent 3 days screwing around with this issue!

  8. YourFavouriteOreo commented on Jun 9, 2018

    @YourFavouriteOreo

    Yas! Sweet! I am so glad! Remember to close this issue so that flutter devs have more accurate representation of issues . Have fun developing!

  9. github-actions commented on Sep 3, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions