Skip to content

项目运行不起来,运行了很多别人的项目是可以的! #17

@sunsboyxu

Description

@sunsboyxu

Compiler message:
lib/pages/main/avatar_history_page.dart:157:23: Error: Method not found: 'UploadFileInfo'.
"avatar": new UploadFileInfo(new File(filePath), fileName),
^^^^^^^^^^^^^^
lib/pages/main/avatar_history_page.dart:156:24: Error: Method not found: 'FormData.from'.
params: FormData.from({
^^^^
lib/utils/file_util.dart:84:24: Error: No named parameter with the name 'connectTimeout'.
options: Options(connectTimeout: 15 * 1000, receiveTimeout: 360 * 1000),
^^^^^^^^^^^^^^
/F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10/lib/src/options.dart:140:2: Context: Found this candidate, but the arguments don't match.
Options({
^^^^^^^
lib/config/api_strategy.dart:139:44: Error: Method not found: 'FormData.from'.
data: formData ?? new FormData.from(params),
^^^^
lib/config/api_strategy.dart:136:61: Error: The getter 'isNotEmpty' isn't defined for the class 'FormData'.

  • 'FormData' is from 'package:dio/src/form_data.dart' ('/F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10/lib/src/form_data.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'isNotEmpty'.
    if (params != null && params.isNotEmpty || formData.isNotEmpty) {
    ^^^^^^^^^^
    lib/logic/avatar_page_logic.dart:115:23: Error: Method not found: 'UploadFileInfo'.
    "avatar": new UploadFileInfo(new File(filePath), fileName),
    ^^^^^^^^^^^^^^
    lib/logic/avatar_page_logic.dart:114:24: Error: Method not found: 'FormData.from'.
    params: FormData.from({
    ^^^^
    lib/logic/feedback_page_logic.dart:91:33: Error: Method not found: 'UploadFileInfo'.
    "avatar": new UploadFileInfo(new File(avatarPath), transFormName),
    ^^^^^^^^^^^^^^
    lib/logic/feedback_page_logic.dart:90:34: Error: Method not found: 'FormData.from'.
    params: FormData.from({
    ^^^^
    /F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_svg-0.13.1/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
    PictureStream();
    ^^^^^^^^^^^^^
    lib/widgets/update_progress_widget.dart:186:28: Error: No named parameter with the name 'connectTimeout'.
    },options: Options(connectTimeout: 151000,receiveTimeout: 3601000),);
    ^^^^^^^^^^^^^^
    /F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10/lib/src/options.dart:140:2: Context: Found this candidate, but the arguments don't match.
    Options({
    ^^^^^^^
    /F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_svg-0.13.1/lib/src/picture_stream.dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
    abstract class PictureStreamCompleter extends Diagnosticable {
    ^

Compiler message:
lib/pages/main/avatar_history_page.dart:157:23: Error: Method not found: 'UploadFileInfo'.
"avatar": new UploadFileInfo(new File(filePath), fileName),
^^^^^^^^^^^^^^
lib/pages/main/avatar_history_page.dart:156:24: Error: Method not found: 'FormData.from'.
params: FormData.from({
^^^^
lib/utils/file_util.dart:84:24: Error: No named parameter with the name 'connectTimeout'.
options: Options(connectTimeout: 15 * 1000, receiveTimeout: 360 * 1000),
^^^^^^^^^^^^^^
/F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10/lib/src/options.dart:140:2: Context: Found this candidate, but the arguments don't match.
Options({
^^^^^^^
lib/config/api_strategy.dart:139:44: Error: Method not found: 'FormData.from'.
data: formData ?? new FormData.from(params),
^^^^
lib/config/api_strategy.dart:136:61: Error: The getter 'isNotEmpty' isn't defined for the class 'FormData'.

  • 'FormData' is from 'package:dio/src/form_data.dart' ('/F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10/lib/src/form_data.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'isNotEmpty'.
    if (params != null && params.isNotEmpty || formData.isNotEmpty) {
    ^^^^^^^^^^
    lib/logic/avatar_page_logic.dart:115:23: Error: Method not found: 'UploadFileInfo'.
    "avatar": new UploadFileInfo(new File(filePath), fileName),
    ^^^^^^^^^^^^^^
    lib/logic/avatar_page_logic.dart:114:24: Error: Method not found: 'FormData.from'.
    params: FormData.from({
    ^^^^
    lib/logic/feedback_page_logic.dart:91:33: Error: Method not found: 'UploadFileInfo'.
    "avatar": new UploadFileInfo(new File(avatarPath), transFormName),
    ^^^^^^^^^^^^^^
    lib/logic/feedback_page_logic.dart:90:34: Error: Method not found: 'FormData.from'.
    params: FormData.from({
    ^^^^
    /F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_svg-0.13.1/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
    PictureStream();
    ^^^^^^^^^^^^^
    lib/widgets/update_progress_widget.dart:186:28: Error: No named parameter with the name 'connectTimeout'.
    },options: Options(connectTimeout: 151000,receiveTimeout: 3601000),);
    ^^^^^^^^^^^^^^
    /F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10/lib/src/options.dart:140:2: Context: Found this candidate, but the arguments don't match.
    Options({
    ^^^^^^^
    /F:/install/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_svg-0.13.1/lib/src/picture_stream.dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
    abstract class PictureStreamCompleter extends Diagnosticable {
    ^
    Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
    build failed.

FAILURE: Build failed with an exception.

  • Where:
    Script 'F:\install\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 882

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'F:\install\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 16s
Exception: Gradle task assembleDebug failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions