I am getting this error when I run the app. What can be problem? I try update my pods. But still I am getting same error. I have an M1 Mac.
↳
objc[11258]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1efc22c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1184b82b8). One of the two will be used. Which one is undefined.
objc[11258]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1efc22c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1184b8308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
Pods-Runner-elvtjvosznfleaabicgoahubaeqy
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:297:15: Error: No named parameter with the name 'scrollBehavior'.
scrollBehavior: scrollBehavior,
^^^^^^^^^^^^^^
../../../development/flutter/packages/flutter/lib/src/material/app.dart:217:9: Context: Found this candidate, but the arguments don't match.
const MaterialApp.router({
^^^^^^^^^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:340:15: Error: No named parameter with the name 'scrollBehavior'.
scrollBehavior: scrollBehavior,
^^^^^^^^^^^^^^
../../../development/flutter/packages/flutter/lib/src/material/app.dart:167:9: Context: Found this candidate, but the arguments don't match.
const MaterialApp({
^^^^^^^^^^^
Command PhaseScriptExecution failed with a nonzero exit code
Pods-Runner-elvtjvosznfleaabicgoahubaeqy
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
If you are using packages get or any packages that relating to get, basically the get latest version is not compatible with your project. Since I'm not directly using it, I go to pubspec.lock and change the version to 4.1.4 instead of the latest one 4.3.4.
if you are using fvm, check your "dart.flutterSdkPath" in setting.json, make sure the path is correct
// .vscode/settings.json
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
// Remove .fvm files from search
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
}
}
https://fvm.app/docs/getting_started/configuration
Just open ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart file, and then delete all parameters with the name 'scrollBehavior'.
This is how my problem was solved!
You are using get package latest version, but your flutter sdk version is old. so you need to update your flutter sdk. I resolved by updating flutter sdk to latest version. Basically getX is mapping GetMaterialApp.route() parameters with MaterialApp.route() parameters but sdk you have used is not latest one so MaterialApp.route() not contains the this.scrollBehavior parameter and getX is not able to map it.
You can resolve issue by two way:
1st You need to install latest flutter sdk or
2nd You need to downgrade getX package till it is compatible with your current flutter sdk.
You just have to delete the scrollBehavior feature completely so that you search for the feature and delete it Via:
C:/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.8/lib/get_navigation/src/root/get_material_app.dart
Related
My project has 3 sub-project including
dart_server
flutter_app
share
The share project is about objects, config, and paths, ... which was used in the dart_server and flutter_app projects.
In the share project. Some objects contain a package used for the flutter like the [get][1] package and this object is used for both projects (dart_server and flutter_app). When using this object in the dart_server project, it will error and the terminal will show an error too long.
error example:
/C:/src/flutter/packages/flutter/lib/src/gestures/velocity_tracker.dart:299:35: Error: Type 'Offset' not found.
void addPosition(Duration time, Offset position) {
^^^^^^
/C:/src/flutter/packages/flutter/lib/src/gestures/velocity_tracker.dart:317:3: Error: Type 'Offset' not found.
Offset _previousVelocityAt(int index) {
^^^^^^
/C:/src/flutter/packages/flutter/lib/src/gestures/velocity_tracker.dart:24:58: Error: Undefined name 'Offset'.
static const Velocity zero = Velocity(pixelsPerSecond: Offset.zero);
^^^^^^
/C:/src/flutter/packages/flutter/lib/src/gestures/velocity_tracker.dart:27:9: Error: 'Offset' isn't a type.
final Offset pixelsPerSecond;
^^^^^^
This can reproduce by creating a dart server project and import any package for the flutter like [get][1] in the file that will run and run this server by dart run.
How to use this object that contains packages for the flutter app?
I just tried the following in DartPad:
void main() {
int? x;
}
and get the following error:
Error compiling to JavaScript:
main.dart:2:6:
Error: This requires the 'non-nullable' experiment to be enabled.
How do I enable that experiment? I am using the Flutter SDK.
Does the experiment support null-safety static analysis already?
Add the following line to the analysis_options.yaml
analyzer:
enable-experiment:
- non-nullable
Enable the non-nullable experiment with three steps:
Add dart-sdk version into pubspec.yaml
environment:
sdk: '>=2.8.0-dev.0 <2.8.0'
Add enable non-nullable experiment into analysis_options.yaml
analyzer:
enable-experiment:
- non-nullable
Run your Dart code:
dart --enable-experiment=non-nullable ./bin/hello_dart.dart
You enable the experiment by passing the flag --enable-experiment=non-nullable to the compiler or analyzer.
It is not a complete feature yet, so there are no promises about what it will do. Feel free to experiment, but don't use the flag for anything serious.
For me, removing pubspec.lock and rerun fix the issue. I was importing the project from Windows to Mac.
Manually removing pubspec.lock and running flutter pub get resolved the problem. In my case it was due to regression.
I'm doing flutter packages pub publish --dry-run to publish an update to my package, GroovinMaterialIcons, and I'm getting warnings that it doesn't depend on the example app:
Suggestions:
* line 3, column 1 of example\lib\main.dart: This package doesn't depend on groovin_material_icons_testapp.
import 'package:groovin_material_icons_testapp/icon_map.dart';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* line 4, column 1 of example\lib\main.dart: This package doesn't depend on groovin_material_icons_testapp.
import 'package:groovin_material_icons_testapp/search.dart';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* line 3, column 1 of example\lib\search.dart: This package doesn't depend on groovin_material_icons_testapp.
import 'package:groovin_material_icons_testapp/icon_map.dart';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This has never happened to me before. Why would the package need to depend on the example?
I was able to solve this by specifying relative path instead of using package:* syntax. E.g. This one gave me warning
import 'package:example/main.dart
which was fixed when I replaced it with
import '../lib/main.dart'
I know that's not the recommended way but the warning went away after this.
You've probably run the dart file with the dart icon instead of the Flutter icon try to run with the Flutter icon.
I know... Another one of this... But no one else's error is the same as mine and I've been trying to build opencv with mingw32 for days now.
When building OpenCV with mingw the command mingw32-make fails at some point trying to compile sources\modules\ts\src\ts_gtest.cpp with error pic bellow:
I've tried following several tutorials, but none work cleanly and this is the best I could get stuff to work.
What I did:
Installed Mingw and added C:\Mingw\bin\ to PATH environment variable.
Installed CMake and added it too to PATH.
Extracted OpenCV to C:\ and created forlder C:\opencv\mingwBuild\
In CMake-GUI I define source folder as C:\opencv\sources\ and build folder as C:\opencv\mingwBuild\.
Hit Configure and select Mingw Makefiles, with 'Use default native compilers' (have also specified compilers explicitly and the result is the same.).
Hit Generate, which creates the Makefile.
I open C:\Mingw\msys\1.0\msys.bat to have a console with all variables loaded (have also tried directly from a simple cmd.exe, given that PATH is set for mingw, but I get the same error in compilation). Navigate to C:\opencv\mingwBuild\ and run mingw32-make.
And that's where the error shows up after a while. Any ideas?
Turns ou gTest was not compiling in Mingw for some reason.
As I don't intend to test my code (for now) I removed opencv_ts from instalation (by deselecting it in Cmake, after configuring and before generating).
Someone mentions, in the first link #Dan Masek refers, that GTest has this issue with type conversion under mingw. They say that you can edit ts_gtest.cpp to apply the correct conversion, according to error message. That may be a solution if you need this module.
Another comment in #Dan Masek's second link mentions that gcc's version 5 surpasses the issue, which version 4 has. So, getting a hold of such distro may also be a solution.
For me it seems to be fixed by applying this fix: https://github.com/msk-repo01/opencv/commit/9a1835ce6676836ce278d723da4ff55a8f900ff1
(Also see: https://github.com/opencv/opencv/issues/8105)
The fix basically replaces the "_RTL_CRITICAL_SECTION" by "_CRITICAL_SECTION" for MingW compilers in modules/ts/include/opencv2/ts/ts_gtest.h in the following way:
The lines
// assuming CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
// This assumption is verified by
// WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.
struct _RTL_CRITICAL_SECTION;
(around line 723 in OpenCV 3.2.0 release from Dec. 2016) are replaced by
# if GTEST_OS_WINDOWS_MINGW
// MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two
// separate (equivalent) structs, instead of using typedef
typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
# else
// assuming CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
// This assumption is verified by
// WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.
typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
# endif
and
_RTL_CRITICAL_SECTION* critical_section_;
is replaced by
GTEST_CRITICAL_SECTION* critical_section_;
I am trying to compile jabber-net in Xamarin Studio so I can use it in a Xamarin.iOS app.
From other searches I have done I am told I need to recompile the source.
From command line I can build the dll, but I have no idea what version of .NET/Mono this is targeting.
This makes a jabber-net.dll and a jabber-net.dll.mdb.
If I add jabber-net.dll to my project, add the reqiured
using jabber.client;
...
...
...
JabberClient client = new JabberClient ();
and try to compile I am told.
/Users/brad/Projects/XMPPChat/XMPPChat/AppDelegate.cs(37,47): error CS0584: Internal compiler error: Could not import type jabber.client.JabberClient' fromjabber-net, Version=2.1.0.702, Culture=neutral, PublicKeyToken=924c5b18328d6f09'
/Users/brad/Projects/XMPPChat/XMPPChat/AppDelegate.cs(37,38): error CS0584: Internal compiler error: Could not import type jabber.client.JabberClient' fromjabber-net, Version=2.1.0.702, Culture=neutral, PublicKeyToken=924c5b18328d6f09'
/Users/brad/Projects/XMPPChat/XMPPChat/AppDelegate.cs(37,38): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
I got no idea what is going on here...
When I try to open any of the .sln's (or include any of the existing projects, even the mono specific project) that came with jabber-net into my solution it will either hang trying to convert the project, or will tell me
The file '/Users/brad/Projects/XMPPChat/JabberNet-2.1.0.710/mono-jabber-net.csproj' could not be loaded.
and will spit out this error.
Any idea where to go from here? :|
Start a new solution from scratch, and add all of the .cs files except those in the test and examples directories. Also make sure you don't have an old version of the .dll around somewhere.