Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 颤振无法运行,获取_导航和主题错误_Macos_Android Studio_Flutter_Macos Catalina - Fatal编程技术网

Macos 颤振无法运行,获取_导航和主题错误

Macos 颤振无法运行,获取_导航和主题错误,macos,android-studio,flutter,macos-catalina,Macos,Android Studio,Flutter,Macos Catalina,我实际上正在尝试运行我的应用程序,但我被错误绊住了: Running "flutter pub get" in riverpod_stacked_app... Launching lib/main.dart on sdk gphone x86 arm in debug mode... Running Gradle task 'assembleDebug'... ../../.pub-cache/hosted/pub.dartlang.org/get-3.15.0/lib/ge

我实际上正在尝试运行我的应用程序,但我被错误绊住了:

Running "flutter pub get" in riverpod_stacked_app...
Launching lib/main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
../../.pub-cache/hosted/pub.dartlang.org/get-3.15.0/lib/get_navigation/src/extension_navigation.dart:235:37: Error: No named parameter with the name 'shadowThemeOnly'.
    final theme = Theme.of(context, shadowThemeOnly: true);
                                    ^^^^^^^^^^^^^^^
../../development/flutter/packages/flutter/lib/src/material/theme.dart:119:20: Context: Found this candidate, but the arguments don't match.
  static ThemeData of(BuildContext context) {
                   ^^
../../.pub-cache/hosted/pub.dartlang.org/get-3.15.0/lib/get_navigation/src/extension_navigation.dart:431:43: Error: No named parameter with the name 'shadowThemeOnly'.
      theme: Theme.of(key.currentContext, shadowThemeOnly: true),
                                          ^^^^^^^^^^^^^^^
../../development/flutter/packages/flutter/lib/src/material/theme.dart:119:20: Context: Found this candidate, but the arguments don't match.
  static ThemeData of(BuildContext context) {
                   ^^


FAILURE: Build failed with an exception.

* Where:
Script '/Users/Alex/development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 900

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/Alex/development/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 19s
Exception: Gradle task assembleDebug failed with exit code 1
我不明白为什么它不能建造。我看不到这两个错误之间的联系:

获取导航 与material.dart主题相关的内容 以及我使用riverpod、stacked_服务和firebase的实际动机。 以下是颤振博士-v的结果:

[✓] Flutter (Channel master, 1.24.0-8.0.pre.98, on Mac OS X 10.15.7 19H2 darwin-x64, locale fr-FR)
    • Flutter version 1.24.0-8.0.pre.98 at /Users/Alex/development/flutter
    • Framework revision ef4ec09a06 (6 hours ago), 2020-11-05 08:02:13 -0800
    • Engine revision bf259226b2
    • Dart version 2.12.0 (build 2.12.0-21.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/Alex/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      I also had this problem today after upgrading Flutter.

I was only able to solve it after I deleted that method parameter from the file that triggered the error. You'll have to delete it in two places.

Search in .pub-cache/hosted/pub.dartlang.org/get-3.15.0/lib/get_navigation/src/extension_navigation.dart for

Theme.of(key.currentContext, shadowThemeOnly: true)
[✓] 颤振主通道,1.24.0-8.0.pre.98,在Mac OS X 10.15.7 19H2 darwin-x64上,现场fr •颤振版本1.24.0-8.0.pre.98 at/Users/Alex/development/颤振 •框架修订版ef4ec09a06 6小时前,2020-11-05 08:02:13-0800 •发动机版本bf259226b2 •Dart版本2.12.0版本2.12.0-21.0.dev [✓] Android工具链-为Android设备开发Android SDK版本30.0.2 •Android SDK位于/Users/Alex/Library/Android/SDK •平台android-30,构建工具30.0.2 •Java二进制地址:/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/Java •Java版本OpenJDK运行时环境构建1.8.0_242-release-1644-b3-6222593 •接受所有Android许可证。 [✗] Xcode-为iOS和macOS开发 ✗ Xcode安装不完整;iOS开发需要完整安装。 下载地址:https://developer.apple.com/xcode/download/ 或者通过应用商店安装Xcode。 安装后,运行: sudoxcode选择-开关/Applications/xcode.app/Contents/Developer sudo xcodebuild-runFirstLaunch ✗ Cocoapod未安装。 CocoaPods用于检索iOS和macOS平台端的插件代码,以响应Dart端的插件使用情况。 如果没有CoCoapod,插件将无法在iOS或macOS上运行。 有关详细信息,请参阅https://flutter.dev/platform-plugins 要安装,请参阅https://guides.cocoapods.org/using/getting-started.htmlinstallation 请示。 [✓] Android Studio 4.1版 •Android Studio位于/Applications/Android Studio.app/Contents •颤振插件可从以下位置安装:
在升级颤振后,我今天也遇到了这个问题

只有在我从触发错误的文件中删除了该方法参数后,我才能解决这个问题。您必须在两个位置删除它

在.pub cache/hosted/pub.dartlang.org/get-3.15.0/lib/get_navigation/src/extension_navigation.dart中搜索

Theme.of(key.currentContext)
将其替换为

 ThemeData theme = Theme.of(key.currentContext, shadowThemeOnly: false);
    if (theme != null) {
      bottomSheet = new Theme(data: theme, child: bottomSheet);
    }
    return bottomSheet;
这可能是由于使用get:^3.15.0依赖项的堆叠服务依赖项造成的

稍后编辑:这实际上不是最好的解决方案,因为克隆您的回购协议的人将无法编译项目,除非他们也同意此更改


因此,最好升级导致此错误的依赖项,或将其替换为另一个依赖项;但只有在运行flift升级后,或尝试更改频道后,这已由getx在16.1中修复。发布升级将完成此操作


您只需要删除


形成你的.pubcach文件夹。

尝试删除.packages文件,运行pub升级,删除pubspec.lock等。我删除堆叠并使用auto_route ExtendedNavigator,它可以工作。谢谢!没问题。很高兴我能帮上忙。谢谢@Phillausofiat这应该是公认的答案,因为这不是黑客行为