flutter create FileException

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

command

flutter create tp

exception

FileSystemException: FileSystemException: Cannot copy file to ‘C:\Users\User\Desktop\dev\tp\android\app\src\main\res\mipmap-hdpi\ic_launcher.png’, path = ‘C:\flutter\packages\flutter_tools\templates\app\android.tmpl\app\src\main\res\mipmap-hdpi\ic_launcher.png’ (OS Error: Access is denied.
, errno = 5)

#0      _File.throwIfError (dart:io/file_impl.dart:645:7)
#1      _File.copySync (dart:io/file_impl.dart:350:5)
#2      ForwardingFile.copySync (package:file/src/forwarding/forwarding_file.dart:30:50)
#3      ForwardingFile.copySync (package:file/src/forwarding/forwarding_file.dart:30:50)
#4      Template.render.<anonymous closure> (package:flutter_tools/src/template.dart:227:18)
#5      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#6      Template.render (package:flutter_tools/src/template.dart:153:24)
#7      CreateCommand._renderTemplate (package:flutter_tools/src/commands/create.dart:630:21)
#8      _rootRunUnary (dart:async/zone.dart:1192:38)
#9      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#13     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#14     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#15     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#16     Template.fromName (package:flutter_tools/src/template.dart)
#17     _rootRunUnary (dart:async/zone.dart:1192:38)
#18     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#19     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#20     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#21     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#22     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#23     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#24     _rootRun (dart:async/zone.dart:1184:13)
#25     _CustomZone.run (dart:async/zone.dart:1077:19)
#26     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#27     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#28     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#29     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#30     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#31     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

flutter doctor

[✓] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18363.1082], locale en-US)
    • Flutter version 1.17.5 at C:\flutter
    • Framework revision 8af6b2f038 (2 months ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\User\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\Users\User\AppData\Local\Android
    • Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[✓] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio1
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[✓] VS Code (version 1.49.0)
    • VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.14.1

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

• No issues found!

1 possible answer(s) on “flutter create FileException