Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Unable to run the flutter example on windows #11

Closed
0Vipin0 opened this issue Oct 5, 2021 · 15 comments
Closed

Unable to run the flutter example on windows #11

0Vipin0 opened this issue Oct 5, 2021 · 15 comments
Labels
question Further information is requested

Comments

@0Vipin0
Copy link

0Vipin0 commented Oct 5, 2021

Steps to reproduce:

  1. Simply run the flutter example on windows

Issue:
I am not able to run the example on Windows.

Flutter Run Logs:
[ +144 ms] executing: [C:\Users\Vipin Malik\fvm\versions\stable/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[+1045 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +3 ms] f4abaa0735eba4dfd8f33f73363911d63931fe03
[ +7 ms] executing: [C:\Users\Vipin Malik\fvm\versions\stable/] git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ +148 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ +9 ms] 2.2.3
[ +10 ms] executing: [C:\Users\Vipin Malik\fvm\versions\stable/] git rev-parse --abbrev-ref --symbolic @{u}
[ +57 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ +2 ms] origin/stable
[ +6 ms] executing: [C:\Users\Vipin Malik\fvm\versions\stable/] git ls-remote --get-url origin
[ +48 ms] Exit code 0 from: git ls-remote --get-url origin
[ +2 ms] https://github.com/flutter/flutter.git
[ +205 ms] executing: [C:\Users\Vipin Malik\fvm\versions\stable/] git rev-parse --abbrev-ref HEAD
[ +62 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +2 ms] stable
[ +120 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +6 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +88 ms] executing: C:\Users\Vipin Malik\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[ +38 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +7 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +9 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +116 ms] executing: C:\Users\Vipin Malik\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[ +33 ms] Skipping pub get: version match.
[ +80 ms] Found plugin libwinmedia at F:\Open-Source\libwinmedia\flutter
[ +643 ms] Found plugin libwinmedia at F:\Open-Source\libwinmedia\flutter
[ +170 ms] Initializing file store
[ +15 ms] Skipping target: gen_localizations
[ +7 ms] complete
[ +8 ms] Launching lib\main.dart on Windows in debug mode...
[ +10 ms] C:\Users\Vipin Malik\fvm\versions\stable\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Users\Vipin
Malik\fvm\versions\stable\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\Users\Vipin Malik\fvm\versions\stable\bin\cache\artifacts\engine\common\flutter_patched_sdk/
--incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill
C:\Users\VIPINM~1\AppData\Local\Temp\flutter_tools.5c57fce5\flutter_tool.ca55c4ca\app.dill --packages F:\Open-Source\libwinmedia\flutter\example.dart_tool\package_config.json -Ddart.vm.profile=false
-Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build\3c113a45063dc6628e68a4111abcacad.cache.dill.track.dill
--enable-experiment=alternative-invalidation-strategy
[ +60 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[ +44 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[ +3 ms] [
{
"instanceId": "a458a554",
"installDate": "2020-09-23T17:57:52Z",
"installationName": "VisualStudio/16.7.4+30517.126",
"installationPath": "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community",
"installationVersion": "16.7.30517.126",
"productId": "Microsoft.VisualStudio.Product.Community",
"productPath": "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe",
"state": 4294967295,
"isComplete": true,
"isLaunchable": true,
"isPrerelease": false,
"isRebootRequired": false,
"displayName": "Visual Studio Community 2019",
"description": "Powerful IDE, free for students, open-source contributors, and individuals",
"channelId": "VisualStudio.16.Release",
"channelUri": "https://aka.ms/vs/16/release/channel",
"enginePath": "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service",
"releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660893#16.7.4",
"thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
"updateDate": "2020-09-23T17:57:51.9916061Z",
"catalog": {
"buildBranch": "d16.7",
"buildVersion": "16.7.30517.126",
"id": "VisualStudio/16.7.4+30517.126",
"localBuild": "build-lab",
"manifestName": "VisualStudio",
"manifestType": "installer",
"productDisplayVersion": "16.7.4",
"productLine": "Dev16",
"productLineVersion": "2019",
"productMilestone": "RTW",
"productMilestoneIsPreRelease": "False",
"productName": "Visual Studio",
"productPatchVersion": "4",
"productPreReleaseMilestoneSuffix": "1.0",
"productSemanticVersion": "16.7.4+30517.126",
"requiredEngineVersion": "2.7.3132.26759"
},
"properties": {
"campaignId": "",
"canceled": "0",
"channelManifestId": "VisualStudio.16.Release/16.7.4+30517.126",
"nickname": "",
"setupEngineFilePath": "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe"
}
}
]
[ +9 ms] Building Windows application...
[ +37 ms] <- compile package:libwinmedia_example/main.dart
[ +26 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S F:\Open-Source\libwinmedia\flutter\example\windows -B
build\windows -G Visual Studio 16 2019
[ +31 ms] List of devices attached
[ +9 ms] List of devices attached
[+1156 ms] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
[ +63 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/libwinmedia/windows/CMakeLists.txt:7 (add_subdirectory):
[ +7 ms] add_subdirectory given source
[ +6 ms] "F:/Open-Source/libwinmedia/flutter/example/windows/flutter/ephemeral/.plugin_symlinks/libwinmedia/windows/../.master"
[ +1 ms] which is not an existing directory.
[ +1 ms] -- Configuring incomplete, errors occurred!
[ +1 ms] See also "F:/Open-Source/libwinmedia/flutter/example/build/windows/CMakeFiles/CMakeOutput.log".
[ +32 ms] Building Windows application... (completed in 1,352ms)
[+13400 ms] Exception: Unable to generate build files
[ +3 ms] "flutter run" took 16,201ms.
[ +16 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:663:9)

#2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1043:27)

#3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)

#5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)

#8 run.. (package:flutter_tools/runner.dart:62:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 main (package:flutter_tools/executable.dart:91:3)

[ +269 ms] ensureAnalyticsSent: 264ms
[ +5 ms] Running shutdown hooks
[ +5 ms] Shutdown hooks complete
[ +1 ms] exiting with code 1

Flutter Doctor Logs:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1237], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.4)
[√] Android Studio (version 4.1.0)
[√] IntelliJ IDEA Community Edition (version 2020.3)
[√] VS Code (version 1.59.1)
[√] Connected device (3 available)

• No issues found!

@alexmercerind
Copy link
Member

alexmercerind commented Oct 5, 2021

@0Vipin0 did you clone the repository? (as opposed to using pub.dev distribution)

@alexmercerind
Copy link
Member

If yes, you need to fetch respective submodules aswell.

git submodule update --init --recursive

Learn more: https://stackoverflow.com/a/8084186/12825435

@alexmercerind alexmercerind added the question Further information is requested label Oct 5, 2021
@0Vipin0
Copy link
Author

0Vipin0 commented Oct 5, 2021

Tried that also but issue is still coming.

Steps taken:
git submodule update --init --recursive

git pull --recurse-submodules --jobs=10

flutter clean

flutter run -d windows

Flutter Run Logs:
Running "flutter pub get" in example...
Launching lib\main.dart on Windows in debug mode...
Building Windows application...
CMake Error at flutter/ephemeral/.plugin_symlinks/libwinmedia/windows/CMakeLists.txt:7 (add_subdirectory):
add_subdirectory given source
"F:/Open-Source/libwinmedia/flutter/example/windows/flutter/ephemeral/.plugin_symlinks/libwinmedia/windows/../.master"
which is not an existing directory.

Exception: Unable to generate build files

@bdlukaa
Copy link
Contributor

bdlukaa commented Oct 5, 2021

You can clone again with --recursive

@alexmercerind
Copy link
Member

alexmercerind commented Oct 5, 2021

Let know if it doesn't work. Not issue with library regardless. It could be issue that your git CLI isn't updated & symlinks aren't getting generated correctly on Windows.

@0Vipin0
Copy link
Author

0Vipin0 commented Oct 5, 2021

After cloning from again with recursive flag, it still doesn't work.

git clone --recursive https://github.com/harmonoid/libwinmedia.git

flutter clean

Same error before is coming

@alexmercerind
Copy link
Member

@0Vipin0 could you send screenshot of the flutter folder ? (inside the folder that you cloned)

@0Vipin0
Copy link
Author

0Vipin0 commented Oct 6, 2021

Here is my folder structure of the flutter folder inside the cloned repo.

image

@alexmercerind
Copy link
Member

@0Vipin0

As you can see .master file is not generated as a symlink (see repo for comparison). I think your git is not updated (please update).
If your git was updated that symlink would've been resolved as a proper Windows shortcut.

@0Vipin0
Copy link
Author

0Vipin0 commented Oct 6, 2021

@alexmercerind I have updated the git to the latest version for windows, cloned the repo again and ran the example again but the issue still persist.

@bdlukaa
Copy link
Contributor

bdlukaa commented Oct 6, 2021

@alexmercerind can't we do the same thing we do on system_theme. Fetch it from github?

@alexmercerind
Copy link
Member

alexmercerind commented Oct 6, 2021

@0Vipin0,
See how my git has generated automatic shortcut based on Linux type symlink (unlike yours).

Screenshot 2021-10-06 230249

@bdlukaa

back then, I didn't know much about submodules. Using file() DOWNLOAD from CMake, it can cause problems for developers in country where GitHub available. Extracting contents of archive adds another process to the game. Didn't wanna go with it.

@alexmercerind
Copy link
Member

@0Vipin0 I recently published a version on pub.dev. You may use it in your app. Hope you'll find it working.

@yhsj0919
Copy link

image
But it can run on 16.11.3

@lc-os
Copy link

lc-os commented Nov 22, 2021

142393842-860d57f8-2ce2-4b42-a842-a5e478c42fc4
Download and replace this file through the URL

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants