i want to compile qgis project that i pull it from this url: https://github.com/qgis/QGIS
the problem is that i can't compile it and the ide says that other classes have some bugs,
the error that i receive from my ide is:
fatal error: qgstest.h: No such file or directory|
error: 'nullptr' was not declared in this scope|
qgis\external\astyle\ASLocalizer.cpp|253|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASLocalizer.cpp|316|error: 'class std::vector<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<wchar_t> > >' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASLocalizer.cpp||In member function 'std::__cxx11::string astyle::Translation::convertToMultiByte(const wstring&) const':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASLocalizer.cpp|325|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|837|warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|837|error: 'shared_ptr' has not been declared|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|837|error: expected ',' or '...' before '<' token|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|835|error: default argument missing for parameter 3 of 'std::__cxx11::string astyle::ASFormatter::peekNextText(const string&, bool, int) const'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASEnhancer.cpp||In member function 'void astyle::ASEnhancer::parseCurrentLine(std::__cxx11::string&, bool, bool)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASEnhancer.cpp|627|error: 'class std::vector<astyle::ASEnhancer::SwitchVariables>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|837|warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|837|error: 'shared_ptr' has not been declared|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|837|error: expected ',' or '...' before '<' token|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\astyle.h|835|error: default argument missing for parameter 3 of 'std::__cxx11::string astyle::ASFormatter::peekNextText(const string&, bool, int) const'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In constructor 'astyle::ASBeautifier::ASBeautifier()':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|34|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|97|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'virtual void astyle::ASBeautifier::init(astyle::ASSourceIterator*)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|314|error: 'class std::vector<std::vector<const std::__cxx11::basic_string<char>*>*>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|323|error: 'class std::vector<int>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|327|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'virtual std::__cxx11::string astyle::ASBeautifier::beautify(const string&)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|905|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1096|error: 'class std::vector<std::pair<int, int> >' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::registerContinuationIndent(const string&, int, int, int, int, bool)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1303|error: 'class std::vector<int>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1305|error: 'class std::vector<int>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1311|error: 'class std::vector<int>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1348|error: 'class std::vector<int>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::registerContinuationIndentColon(const string&, int, int)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1367|error: 'class std::vector<int>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'std::vector<std::vector<const std::__cxx11::basic_string<char>*>*>* astyle::ASBeautifier::copyTempStacks(const astyle::ASBeautifier&) const':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1519|error: 'class std::vector<std::vector<const std::__cxx11::basic_string<char>*>*>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::deleteContainer(T&)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1547|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::deleteBeautifierContainer(std::vector<astyle::ASBeautifier*>*&)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1563|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::deleteTempStacksContainer(std::vector<std::vector<const std::__cxx11::basic_string<char>*>*>*&)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1584|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::initContainer(T&, T)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1607|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::initTempStacksContainer(std::vector<std::vector<const std::__cxx11::basic_string<char>*>*>*&, std::vector<std::vector<const std::__cxx11::basic_string<char>*>*>*)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1620|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp||In member function 'void astyle::ASBeautifier::processPreprocessor(const string&, const string&)':|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|1991|error: 'class std::vector<astyle::ASBeautifier*>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|2300|error: 'class std::vector<int>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|2530|error: 'nullptr' was not declared in this scope|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|2729|error: 'class std::vector<const std::__cxx11::basic_string<char>*>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|3009|error: 'class std::vector<std::vector<const std::__cxx11::basic_string<char>*>*>' has no member named 'emplace_back'|
C:\Users\Win 1809 UEFI\Desktop\qgis\external\astyle\ASBeautifier.cpp|3010|error: 'class std::vector<const std::__cxx11::basic_string<char>*>' has no member named 'emplace_back'|
Related
e: D:\development\flutter.pub-cache\hosted\pub.dartlang.org\pay_android-1.0.5\android\src\main\kotlin\io\flutter\plugins\pay_android\PayMethodCallHandler.kt: (50, 69): Type mismatch: inferred type is Activity? but Activity was expected
e: D:\development\flutter.pub-cache\hosted\pub.dartlang.org\pay_android-1.0.5\android\src\main\kotlin\io\flutter\plugins\pay_android\PayMethodCallHandler.kt: (69, 74): Type mismatch: inferred type is String? but String was expected
e: D:\development\flutter.pub-cache\hosted\pub.dartlang.org\pay_android-1.0.5\android\src\main\kotlin\io\flutter\plugins\pay_android\PayMethodCallHandler.kt: (73, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Map<String, Any>?
e: D:\development\flutter.pub-cache\hosted\pub.dartlang.org\pay_android-1.0.5\android\src\main\kotlin\io\flutter\plugins\pay_android\PayMethodCallHandler.kt: (74, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Map<String, Any>?
I was trying to run flutter code but it keeps on showing following error.
I have tried updating the version of flutter_svg and cached_network_image but error still persists.
Compiler message:
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:335:20: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'while resolving a picture',
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:337:33: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:432:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:495:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:559:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_stream.dart:256:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: context,
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_stream.dart:301:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'resolving a single-frame picture stream',
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/svg.dart:158:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'picture failed to precache',
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:399:35: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer buff) {
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:408:22: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'in _Element.clipPath',
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:798:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer buff) {
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:809:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'in parseSvgElement',
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/utilities/errors.dart:8:32: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'in $methodName',
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/utilities/errors.dart:10:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer buff) {
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/zoomable_image-1.3.1/lib/src/zoomable_image.dart:174:30: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
- 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
_imageStream.addListener(_handleImageLoaded);
^
file:///C:/flutter%20Dev/flutter/.pub-cache/hosted/pub.dartlang.org/zoomable_image-1.3.1/lib/src/zoomable_image.dart:186:33: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
- 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///C:/flutter%20Dev/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
_imageStream.removeListener(_handleImageLoaded);
^
Compiler failed on F:\Downloads\weo\lib\main.dart
Finished with error: Gradle task assembleDebug failed with exit code 1
Compiler message:
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/svg.dart:158:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'picture failed to precache',
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/picture_provider.dart:335:20: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'while resolving a picture',
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/picture_provider.dart:337:33: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/picture_provider.dart:432:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/picture_provider.dart:495:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/picture_provider.dart:559:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/picture_stream.dart:256:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: context,
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/picture_stream.dart:301:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'resolving a single-frame picture stream',
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/svg/parser_state.dart:399:35: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer buff) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/svg/parser_state.dart:408:22: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'in _Element.clipPath',
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/svg/parser_state.dart:798:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer buff) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/svg/parser_state.dart:809:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'in parseSvgElement',
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/flutter_advanced_networkimage.dart:149:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.4.15/lib/src/flutter_advanced_networksvg.dart:106:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/utilities/errors.dart:8:32: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: 'in $methodName',
^
file:///home/cepl/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4/lib/src/utilities/errors.dart:10:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/cepl/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer buff) {
^
Compiler failed on /home/cepl/Divum-Ajit/Flutter/weupdateyou-consumer-flutter/lib/main.dart
Finished with error: Gradle task assembleDebug failed with exit code 1
For me it was fixed upgrading the package cached_network_image to the version 0.8.0.
Edit the file pubspec.yaml from your Flutter project and upgrade to the latest version.
cached_network_image: ^0.8.0
You need to update your svg library to the latest version.
https://pub.dev/packages/flutter_svg#-installing-tab-
You can found their discussion about that issue
https://github.com/flutter/flutter/issues/31962
i have experienced the same problem after upgrading to flutter 1.7 it gave the same error with many packages the solution is to upgrade your packages in pubspec.yaml
I have a type class instance and want to use it implicitly but got following error message:
Error:(10, 29) not enough arguments for method format: (implicit p: ch.micarna.interface.Printable[ch.micarna.cats.Cat])String.
Unspecified value parameter p.
val v = Printable.format(cat)
Error:(10, 29) could not find implicit value for parameter p: ch.micarna.interface.Printable[ch.micarna.cats.Cat]
val v = Printable.format(cat)
The implementation of the type class looks as follow:
As you can see on the image, the implementation is imported from the package import ch.micarna.instances._ where type class for Cat type is implemented.
What am I doing wrong?
I'm trying to specify generic function that should return some Number in trait like this:
import Numeric.Implicits._
trait ReturnsNumberResult {
def process[T : Numeric](): T
def output[T : Numeric](v: T)(implicit numeric: Numeric[T]): String
def runJob(): Any = {
output(process())
}
When I'm trying to compile this trait I got error:
ambiguous implicit values: [error] both object BigIntIsIntegral in
object Numeric of type scala.math.Numeric.BigIntIsIntegral.type
[error] and object IntIsIntegral in object Numeric of type
scala.math.Numeric.IntIsIntegral.type [error] match expected type
Numeric[T] [error] output(process())
What is wrong and how my goal can be achieved?
This is caused by in runJob doesn't explicitly declare the type of T: Numeric for your output and process method.
So the compiler can't infer type T: Numeric for both output and process method in runJob method.
So you can fix it like:
def runJob[T: Numeric](): Any = { //explicitly declare the type T: Numeric
output[T](process()) // In there we explicitly set the type `T` for output, and for `process` method can auto infer from `output` method
}