singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.54k stars 814 forks source link

Unable to build example app on Windows or Android - Nuget is not installed #2280

Open AtlasAutocode opened 2 hours ago

AtlasAutocode commented 2 hours ago

Is there an existing issue for this?

Flutter Quill version

10.7.5

Steps to reproduce

  1. Android Studio, Terminal
  2. flutter build windows

Or:

  1. Select Target
  2. Run Debug

Expected results

App compiles or runs

Actual results

Nuget is not installed.

C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: The command "setlocal [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: NUGET-NOTFOUND install Microsoft.Windows.ImplementationLibrary -Version 1.0.231216.1 -ExcludeVersion -OutputDirectory C:/Flutter/GitHub/flutter-quill/example/build/windows/x64/packages [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: NUGET-NOTFOUND install Microsoft.Web.WebView2 -Version 1.0.2210.55 -ExcludeVersion -OutputDirectory C:/Flutter/GitHub/flutter-quill/example/build/windows/x64/packages [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: NUGET-NOTFOUND install nlohmann.json -Version 3.11.2 -ExcludeVersion -OutputDirectory C:/Flutter/GitHub/flutter-quill/example/build/windows/x64/packages [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmEnd [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmErrorLevel [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: exit /b %1 [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmDone [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :VCEnd" exited with code 9009. [C:\Flutter\GitHub\flutter-quill\example\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj]
Building Windows application...                                    839ms
Build process failed.

Additional Context

Other flutter apps compile with no problem so something has happened in my fork of Flutter Quill. Other apps that use Flutter-Quill run without problem, flutter build web succeeds I had no problems yesterday with 10.7.3

Something broke but I have no idea what or how to fix it! Anyone know how to install Nuget on Android Studio?

EchoEllet commented 2 hours ago

Flutter CLI already automate this but just to confirm do you have this change in the example?

See all changes between 10.7.3 and 10.7.5. I have never heard of Nugest before in native Android or Flutter Android apps. A quick search indicate that's for .NET projects.

Can you try running the app without flutter_quill_extensions since it uses plugins that use flutter_inappwebview. Could be related to flutter_inappwebview_windows since it has been added recently (33 hours ago).

AtlasAutocode commented 1 hour ago

That makes sense. My other app that uses Flutter-Quill does not include extensions and the error message does refer to inappwebview. Why it should be trying to use Nuget is a mystery and my inability to run on Android makes no sense. Running on web is also inconsistent. Will check when I get back to my main computer.

EchoEllet commented 1 hour ago

That's one reason why I suggest discounting the support of the YouTube video player in #2276

Having heavy dependency only to load YouTube iframe embeds on desktop/mobile is not ideal. If loading the YouTube video in video player using the download URL is against the terms of service of YouTube then that gives us another reason to not support it as a default when a user asks for this feature built-in.

EchoEllet commented 1 hour ago

The question is that we never updated the dependencies of flutter_quill_extensions in the last 32 hours to use the new version that include flutter_inappwebview_windows as a default implementation, so:

AtlasAutocode commented 18 minutes ago

Flutter CLI already automate this but just to confirm do you have this change in the example?

Confirmed.

That's one reason why I suggest discounting the support of the YouTube video player in https://github.com/singerdmx/flutter-quill/issues/2276

I agree. We should not get in the middle of this. Again, your concept of an API provides the ability of users to add a plug-in of what they want without affecting how the QuillEditor works. Maintainability and reliability.

I tried opening the flutter_inappwebview_windows_DEPENDENCIES_DOWNLOAD.vcxproj in Visual Studio and it failed to build. The error was Cannot open include file: 'nlohmann/json.hpp': No such file or directory This is consistent with NuGet failing to install the json package. Another error was: Cannot open include file: 'WebView2.h': No such file or directory I have no idea where this comes from.

Another error was: The command "setlocal NUGET-NOTFOUND install Microsoft.Windows.ImplementationLibrary -Version 1.0.231216.1 -ExcludeVersion -OutputDirectory C:/Flutter/GitHub/flutter-quill/example/build/windows/x64/packages I assume NUGET-NOTFOUND is part of the command line because of the previous failure to download the json nuget package

I tried using the VS package manager to install the Newtonsoft Json Nuget package and it failed: Could not install package 'Newtonsoft.Json 13.0.3'. You are trying to install this package into a project that targets 'native,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Is it possible 'native,Version=v0.0' might be the problem?

I retried to build in VS but selected Release build x64. Same result. 4 projects succeeded and 2 failed.