nicolastinkl / UUVPN

基于Flutter开发的VPN客户端(ios/android),自主设计,精美UI,优化VPN速度,完全开源。
229 stars 103 forks source link

There is a problem when flutter runs! #5

Closed wwwAngHua closed 2 months ago

wwwAngHua commented 4 months ago

I have a problem running the app:

How to solve it, hope to get your reply, thank you!

~/workSpace/UUVPN/flutter (main ✗) flutter run
Launching lib/main.dart on MI 9 SE in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

lib/model/themeCollection.dart:47:11: Error: No named parameter with the name 'bodyText1'.
          bodyText1: const TextStyle(color: Colors.black, fontSize: 15),
          ^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/text_theme.dart:89:9: Context: Found this candidate, but the arguments don't match.
  const TextTheme({
        ^^^^^^^^^
lib/model/themeCollection.dart:65:11: Error: No named parameter with the name 'bodyText1'.
          bodyText1: TextStyle(color: Colors.white, fontSize: 15),
          ^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/text_theme.dart:89:9: Context: Found this candidate, but the arguments don't match.
  const TextTheme({
        ^^^^^^^^^
lib/widgets/home_widget.dart:46:69: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
              Text(title, style: Theme.of(context).primaryTextTheme.subtitle1),
                                                                    ^^^^^^^^^
lib/widgets/home_widget.dart:50:61: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
                  style: Theme.of(context).primaryTextTheme.caption,
                                                            ^^^^^^^
lib/pages/proPage.dart:162:55: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
            style: Theme.of(context).primaryTextTheme.caption,
                                                      ^^^^^^^
lib/pages/proPage.dart:189:22: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
                    .headline6!
                     ^^^^^^^^^
lib/pages/proPage.dart:212:24: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
                      .headline6!
                       ^^^^^^^^^
lib/pages/proPage.dart:219:24: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText1'.
                      .bodyText1!
                       ^^^^^^^^^
lib/pages/ProOnecePage.dart:81:59: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
                style: Theme.of(context).primaryTextTheme.headline6!.copyWith(
                                                          ^^^^^^^^^
lib/pages/ProOnecePage.dart:90:55: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
            style: Theme.of(context).primaryTextTheme.caption,
                                                      ^^^^^^^
lib/pages/ProOnecePage.dart:117:22: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
                    .headline6!
                     ^^^^^^^^^
lib/pages/ProOnecePage.dart:140:24: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
                      .headline6!
                       ^^^^^^^^^
lib/pages/ProOnecePage.dart:147:24: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText1'.
                      .bodyText1!
                       ^^^^^^^^^
lib/pages/homePage.dart:85:59: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
                style: Theme.of(context).primaryTextTheme.headline6,
                                                          ^^^^^^^^^
lib/pages/homePage.dart:88:61: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
                  style: Theme.of(context).primaryTextTheme.caption),
                                                            ^^^^^^^
lib/routes/chooseLocationRoute.dart:33:57: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
              style: Theme.of(context).primaryTextTheme.subtitle1,
                                                        ^^^^^^^^^
lib/pages/accountPage.dart:86:69: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
              Text(title, style: Theme.of(context).primaryTextTheme.subtitle1),
                                                                    ^^^^^^^^^
lib/pages/accountPage.dart:90:61: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
                  style: Theme.of(context).primaryTextTheme.caption,
                                                            ^^^^^^^
lib/pages/accountPage.dart:118:16: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText1'.
              .bodyText1!
               ^^^^^^^^^
lib/pages/accountPage.dart:203:63: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText1'.
                    style: Theme.of(context).primaryTextTheme.bodyText1,
                                                              ^^^^^^^^^
lib/pages/accountPage.dart:254:57: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
              style: Theme.of(context).primaryTextTheme.subtitle1),
                                                        ^^^^^^^^^
lib/routes/settingsRoute.dart:41:69: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
              Text(title, style: Theme.of(context).primaryTextTheme.subtitle1),
                                                                    ^^^^^^^^^
lib/routes/settingsRoute.dart:45:61: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
                  style: Theme.of(context).primaryTextTheme.caption,
                                                            ^^^^^^^
lib/routes/settingsRoute.dart:73:16: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText1'.
              .bodyText1!
               ^^^^^^^^^
lib/routes/settingsRoute.dart:100:20: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
                  .subtitle1!
                   ^^^^^^^^^
lib/routes/settingsRoute.dart:112:57: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
              style: Theme.of(context).primaryTextTheme.subtitle1,
                                                        ^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where:
Script '/Users/wanghua/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1629

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/wanghua/flutter/bin/flutter'' 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 5s
Running Gradle task 'assembleDebug'...                              5.8s
Error: Gradle task assembleDebug failed with exit code 1
nicolastinkl commented 2 months ago

The latest version has been fixed, please use the latest version.