win32 plugin build error in flutter_openvpn with Flutter 2.0 / Dart 12 - flutter

I get this error when I build the app for iOS: Command PhaseScriptExecution failed with a nonzero exit code.
Screenshot of the build error in Xcode

This error is caused by an old version of the win32 package that uses Dart FFI in a way that was prohibited with the release of Dart 2.12.
To fix this, update the win32 package. If the package is a transitive dependency, you can use dependency_overrides.

Related

how do I point latest Dart version to this project?

I am trying to run the code on below project but has been noticing the error about Dart SK version (See below error).
Tried: pub get on YML file, get dependencies on main.dart file but same error. Any help? I read earlier resolution which says adding the version at YML file but it did not work. I also, installed the 2.17.6 in my machine and configured the Environment variable but no luck. Help please
Project from Github:
git clone https://github.com/flutter/codelabs.git
cd codelabs/boring_to_beautiful/step_01/
Error on Android Studio:
Waiting for another flutter command to release the startup lock...
Running "flutter pub get" in step_01...
The current Dart SDK version is 2.17.1.
Because myartist requires SDK version >=2.17.6 <3.3.0, version solving failed.
pub get failed (1; Because myartist requires SDK version >=2.17.6 <3.3.0, version solving failed.)
Process finished with exit code 1
The pubspec.yml has below
environment:
sdk: ">=2.17.6 <3.3.0"

(unknown SDK "flutter´")

not understand why not compiled my project in flutter, when compile it show this.
the path is good in the environment of variable the sdk of flutter is good
[teimprimimos] dart pub get
Resolving dependencies...
Because teimprimimos depends on flutter from sdk which doesn't exist (unknown SDK "flutter´"), version solving failed.
It's a late answer but I encountered recently that's why answering here. In your pubspec.yaml where spelling of flutter sdk under dependencies or dev_dependencies.

Can't run on dart_vlc on Flutter 2.10.4

dart_vlc (https://github.com/alexmercerind/dart_vlc) was compiling for macOS up to now, but after upgrading to Flutter 2.10.4 I receive this error while compiling:
[100%] Linking CXX static library libdart_vlc_core.a
[100%] Built target dart_vlc_core
Install the project...
-- Install configuration: ""
-- Installing: /Users/abd/gits/myflutter/macos/Pods/../Flutter/ephemeral/.symlinks/plugins/dart_vlc/macos/deps/lib/libdart_vlc_core.a
error: install_name_tool: can't open file: /Users/abd/gits/myflutter/macos/Pods/VLCKit/VLCKit.xcframework/macos-arm64_x86_64/VLCKit.framework/VLCKit (No such file or directory)
This is how I resolve this-
flutter clean on a project
update version of dart_vlc with latest one.
Now, try to build it again and it works.

seems no-sound-null-safety parameter not work in flutter 2.2.1

I am upgrade my flutter to version 2.2.1, but it seems --no-sound-null-safety no longer avaliable when build the ios package. I am build the project using this command:
~/apps/flutter/bin/flutter build ios --release --no-codesign --no-sound-null-safety
but the output still tell me some package did not support null safety:
Changing current working directory to: /Users/dolphin/source/cruise-open
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.earth.dolphin for device (ios-release)...
Running Xcode build...
Xcode build done. 36.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
2 warnings generated.
2 warnings generated.
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:state_notifier
- package:fish_redux
- package:flutter_icons
For solutions, see https://dart.dev/go/unsound-null-safety
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
note: Removed stale file
Encountered error while building for device.
is there any solution with this problem? I am search from flutter issue but no one confirm this problem(https://github.com/flutter/flutter/issues/84199), is it a bug of new version?(Because I am using this command works fine until I upgrade to version 2.2.1). is there other way to pass no-sound-null-safety parameter? I have tried many version and found some version works fine, some version did not works. Maybe a flutter bug.
flutter 2.0.1 works
flutter 2.0.3 works
flutter 2.0.6 works
flutter 2.2.0 not works
flutter 2.2.1 not works
flutter 2.2.2 not works
flutter 2.2.3 not works
seem a bug, will fixed next release:https://github.com/flutter/flutter/pull/84372

fatal error: module 'flutter_web_auth' not found

When running the project on a simulator everything seems to work fine. Once i tried to deploy to an actual device I get the following error:
iOS Version - 13.0
Xcode Version - 11.3.1
Flutter Version - 1.12.13+hotfix.8
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...
Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)... 30.5s
Built to build/aot/.
warning: parsing line table prologue at offset 0x6f697463 found unsupported
version 0x00
warning: line table parameters mismatch. Cannot emit.
note: while processing
/Users/<Username>/Documents/flutter_test_app/build/aot/armv7/snapsho
t_assembly.o
Project /Users/<Username>/Documents/flutter_test_app built and
packaged successfully.
/Users/<Username>/Documents/flutter_test_app/ios/Runner/GeneratedPlu
ginRegistrant.m:10:9: fatal error: module 'flutter_web_auth' not found
#import flutter_web_auth;
~~~~~~~^~~~~~~~~~~~~~~~
1 error generated.
/Users/<Username>/Documents/flutter_test_app/ios/Runner/GeneratedPlu
ginRegistrant.m:10:9: fatal error: module 'flutter_web_auth' not found
#import flutter_web_auth;
~~~~~~~^~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error running application on iPhone.
Make sure you have added flutter we bauth dependency plugin in your pubspec.yaml
dependencies:
flutter_web_auth: ^0.1.3
If it's added and it still does not works, ensure also that the pod install works fine to add the plugin.