flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.12k stars 27.43k forks source link

macOS app fails to build after renaming the flutter_created directory #127873

Open HansMuller opened 1 year ago

HansMuller commented 1 year ago

On macOS: if I create an app with flutter create foo and then rename the foo directory, the app fails to run. Summary:

flutter create foo
(cd foo; flutter run --device-id macos) # all is well
mv foo button_examples
(cd button_examples; flutter run --device-id macos) # BUILD fails

See the transcript below for the details. I have a .tar file with the problem app if that's helpful. It's too big to attach to the issue.

The problem goes away upon flutter clean.

```console hansmuller@hansmuller-macbookpro flutter % flutter create foo Creating project foo... Resolving dependencies in foo... Got dependencies in foo. Wrote 129 files. All done! You can find general documentation for Flutter at: https://docs.flutter.dev/ Detailed API documentation is available at: https://api.flutter.dev/ If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev In order to run your application, type: $ cd foo $ flutter run Your application code is in foo/lib/main.dart. hansmuller@hansmuller-macbookpro flutter % (cd foo; flutter run --device-id macos) Resolving dependencies... matcher 0.12.15 (0.12.16 available) test_api 0.5.2 (0.6.0 available) Got dependencies! Launching lib/main.dart on macOS in debug mode... 2023-05-30 12:10:47.066 xcodebuild[41264:49145487] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled) --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:macOS, arch:arm64, id:00006000-000018392121801E } { platform:macOS, arch:x86_64, id:00006000-000018392121801E } warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner') Building macOS application... Syncing files to device macOS... 58ms Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device). A Dart VM Service on macOS is available at: http://127.0.0.1:59272/23tm4WQZX4Q=/ The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:9102?uri=http://127.0.0.1:59272/23tm4WQZX4Q=/ Application finished. # ---- The app ran without any problems ----- hansmuller@hansmuller-macbookpro flutter % rm -rf button_examples; hansmuller@hansmuller-macbookpro flutter % mv foo button_examples hansmuller@hansmuller-macbookpro flutter % (cd button_examples; flutter run --device-id macos) Launching lib/main.dart on macOS in debug mode... 2023-05-30 12:12:08.029 xcodebuild[41663:49147823] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled) --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:macOS, arch:arm64, id:00006000-000018392121801E } { platform:macOS, arch:x86_64, id:00006000-000018392121801E } /Users/hansmuller/flutter/foo/macos/Runner/Configs/Debug.xcconfig:1:1: error: unable to open configuration settings file /Users/hansmuller/flutter/foo/macos/Runner/Configs/Debug.xcconfig:1:1: error: unable to open configuration settings file /Users/hansmuller/flutter/foo/macos/Runner/Configs/AppInfo.xcconfig:1:1: error: unable to open configuration settings file error: Unable to load contents of file list: '/Users/hansmuller/flutter/foo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist' (in target 'Flutter Assemble' from project 'Runner') error: Unable to load contents of file list: '/Users/hansmuller/flutter/foo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist' (in target 'Flutter Assemble' from project 'Runner') warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner') ** BUILD FAILED ** Building macOS application... Exception: Build process failed ```
HansMuller commented 1 year ago

CC @cbracken