New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Framework components are not found when re-building project on other target platforms without cleaning #145889
Comments
@dumabg This is a community package. Can you try with Flutter's first party package and check if you still get similar error for it ? Also, is your project on a mounted Windows file system ? |
What is "first party package"?
Yes |
The packages that are developed by Flutter team. See the list for your reference and take any one of it (ex: camera, video_player or image_picker) and see if using it, you get same error or not. |
I removed package_info_plus and add image_picker.
|
Can you try this on any other location / path (drive) and check if you get same result or not ? |
It seems that is using the last compilation configuration. I done the inverse operation. First compile in windows and after in linux. The error in this case is in linux, trying to find the libraries in the windows configuration.
Doing |
Are you running WSL setup ? |
No. I have a dual boot. The drive with the projects is in a windows partition. |
@dumabg I wonder how you build On my end, it outputs the message below (""build linux" only supported on Linux hosts"): PS C:\Users\ADMIN\Desktop\repro_stable> flutter build windows
Building Windows application... 51.1s
√ Built build\windows\x64\runner\Release\repro_stable.exe (0.1MB).
PS C:\Users\ADMIN\Desktop\repro_stable> flutter build linux
"build linux" only supported on Linux hosts. My PC is also dual boot too (Windows and Ubuntu distro).
This error seems to be an issue with Git, could you check this and the underlying comment to see if it helps? |
I build de Linux project on Linux and the Windows project on Windows, but using the same directory project in the same disk. |
I see, you are using the sample project located on a partition but linking/using the different Flutter SDK directory, right? Could you also share |
Yes. On Linux is installed the Flutter SDK for Linux. On Windows is installed the Flutter SDK for Windows. This is the flutter doctor for Linux: `[✓] Flutter (Channel stable, 3.19.4, on KDE neon 6.0 6.5.0-26-generic, locale es_ES.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [!] Android Studio (version unknown) [✓] VS Code (version 1.87.2) [✓] Connected device (2 available) [✓] Network resources |
@dumabg Thank you for the response. I can reproduce issue mentioned at #145889 (comment) and #145889 (comment) as well (framework components are not found). flutter doctor -v[✓] Flutter (Channel stable, 3.19.5, on Ubuntu 22.04.3 LTS 6.5.0-26-generic, locale en_US.UTF-8)
• Flutter version 3.19.5 on channel stable at /home/huynq/Documents/Working/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (7 days ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc3)
• Android SDK at /home/huynq/Android/Sdk/
• Platform android-33, build-tools 34.0.0-rc3
• Java binary at: /snap/android-studio/current/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 14.0.0-1ubuntu1.1
• cmake version 3.22.1
• ninja version 1.10.1
• pkg-config version 0.29.2
[✓] Android Studio (version 2021.1)
• Android Studio at /home/huynq/Documents/android-studio
• Flutter plugin version 67.0.1
• Dart plugin version 211.7817
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
[!] Android Studio (version unknown)
• Android Studio at /snap/android-studio/current
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to determine Android Studio version.
• android-studio-dir = /snap/android-studio/current
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.84.2)
• VS Code at /usr/share/code
• Flutter extension version 3.84.0
[✓] VS Code (version 1.87.2)
• VS Code at /snap/code/current/usr/share/code
• Flutter extension version 3.84.0
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.3 LTS 6.5.0-26-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 120.0.6099.199
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category. It looks like an issue with Flutter tool. If we build/run app on Windows, then build/run on the same project on Linux, issue appears; and vice versa. Flutter tool seems to look up/re-use (cache?) when starting build/run on the remaining target platform (Linux and Windows in this case for e.g). But if we do For the original issue I would keep this as a Flutter tool issue (2nd issue). Do you find it appropriate? |
Yes |
Thanks. The issue is also reproduced on Flutter master channel. I will change the issue's title as well. flutter doctor -v (stable & master)[√] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Version 10.0.19045.4170], locale en-US)
• Flutter version 3.19.5 on channel stable at C:\WIP\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (6 days ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\AndroidSDK
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio Hedgehog\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4)
• Visual Studio at D:\DOWNLOADWORK\VS2022
• Visual Studio Community 2022 version 17.4.33213.308
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2022.3)
• Android Studio at C:\Program Files\Android\Android StudioGiraffe
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
[√] Android Studio (version 2023.1)
• Android Studio at C:\Program Files\Android\Android Studio Hedgehog
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
[√] VS Code (version 1.87.2)
• VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.84.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.4170]
• Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.86
• Edge (web) • edge • web-javascript • Microsoft Edge 121.0.2277.83
[√] Network resources
• All expected network resources are available.
• No issues found! [!] Flutter (Channel master, 3.22.0-5.0.pre.27, on Microsoft Windows [Version 10.0.19045.4170], locale en-US)
• Flutter version 3.22.0-5.0.pre.27 on channel master at C:\WIP\flutter_master
! Warning: `flutter` on your path resolves to C:\WIP\flutter\bin\flutter, which is not inside your current Flutter SDK checkout at C:\WIP\flutter_master.
Consider adding C:\WIP\flutter_master\bin to the front of your path.
! Warning: `dart` on your path resolves to C:\WIP\flutter\bin\dart, which is not inside your current Flutter SDK checkout at C:\WIP\flutter_master.
Consider adding C:\WIP\flutter_master\bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9c6fcdac6f (in the future), 2024-04-05 02:19:12 +0200
• Engine revision d44462a42d
• Dart version 3.5.0 (build 3.5.0-18.0.dev)
• DevTools version 2.34.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\AndroidSDK
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio Hedgehog\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4)
• Visual Studio at D:\DOWNLOADWORK\VS2022
• Visual Studio Community 2022 version 17.4.33213.308
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2022.3)
• Android Studio at C:\Program Files\Android\Android StudioGiraffe
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
[√] Android Studio (version 2023.1)
• Android Studio at C:\Program Files\Android\Android Studio Hedgehog
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
[√] VS Code (version 1.87.2)
• VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.86.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.4170]
• Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.106
• Edge (web) • edge • web-javascript • Microsoft Edge 121.0.2277.83
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category. |
@dumabg thanks for filing this bug. As I understand it, you are trying to build a Flutter project from the same directory under multiple operating systems, is that correct? If so, that is not supported, and practically speaking we will never support this workflow, as there are too many assumptions in the existing tooling that this workflow violates. I have filed the tracking issue: #146526 to have the tool check for this case and throw a helpful message. In the case where you are dual booting Windows and Linux, I recommend that you have two versions of your project, and exclusively use each from a single operating system. |
Yes.
I have a lot of projects than are compiled for web, Linux, Android at the same directory project without problems. Only occurs with Windows. I have filed the tracking issue: #146526 to have the tool check for this case and throw a helpful message.
|
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 |
Steps to reproduce
Expected results
Build the windows aplication
Actual results
Gives the error:
PathExistsException: PathExistsException: Cannot create link, path = 'D:\temp\test\test\linux\flutter\ephemeral.plugin_symlinks\package_info_plus' (OS Error: No se puede crear un archivo que ya existe.)
If a new project is created on Windows, only with the windows platform, and the code is copied, the build works and creates the application.
Code sample
The default code generated by create, plus a pub add of package_info_plus
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Flutter Doctor output
The text was updated successfully, but these errors were encountered: