Android Studio 错误:未找到类型“DecoderCallback”,ImageStreamCompleter加载(PdfPageImageProvider键,DecoderCallback解码)

e4eetjau  于 12个月前  发布在  Android
关注(0)|答案(1)|浏览(810)

在我的应用程序在iOS 17上失败后,我不得不做很多升级,包括购买一台新的MacBook,这样我就可以为iOS 17做一个构建。
所以,在升级Macbook,XCode和Android Studio之后,我也有很多包要更新(我的应用只有2岁).我现在使用Android Studio Giraffe.让我的应用再次工作,因为所有的包更新花了相当长的时间,但我现在都工作了.
我通常在我的Windows电脑上开发,所以我复制了我所有的更改到Windows,将Android Studio升级到Giraffe,运行Flutter Pub Upgrade以获得最新版本的Flutter和Dart并尝试构建,但这就是我停滞不前的地方。
我得到了错误……

/C:/Users/me/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:24:55: Error: Type 'DecoderCallback' not found.   ImageStreamCompleter load(PdfPageImageProvider key, DecoderCallback decode) =>
                                                      ^^^^^^^^^^^^^^^ /C:/Users/me/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:40:7: Error: Type 'DecoderCallback' not found.
      DecoderCallback decode) async {
      ^^^^^^^^^^^^^^^ /C:/Users/me/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:24:55: Error: 'DecoderCallback' isn't a type.   ImageStreamCompleter load(PdfPageImageProvider key, DecoderCallback decode) =>
                                                      ^^^^^^^^^^^^^^^ /C:/Users/me/AppData/Local/Pub/Cache/hosted/pub.dev/pdfx-2.5.0/lib/src/viewer/pdf_page_image_provider.dart:40:7: Error: 'DecoderCallback' isn't a type.
      DecoderCallback decode) async {
      ^^^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where: Script 'E:\Dev\flutter-new\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1350

* What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\Dev\flutter-new\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 7s Exception: Gradle task assembleDebug failed with exit code 1

字符串
我有点卡住了,我能找到的解决办法很少。
我的扑动医生是...

[√] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.22621.2715], locale en-GB)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Community 2017 15.9.48)
    X Visual Studio 2019 or later is required.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its
default components
[!] Android Studio (version 2021.2)
    X Unable to determine bundled Java version.
[√] Android Studio (version 2022.3)
[√] Android Studio (version 4.2)
[√] Connected device (4 available)
[√] Network resources

! Doctor found issues in 2 categories.


我不是为Windows写的,所以不需要VS2019的原因。我安装了Java版本8。
当我尝试使用AGP Ugrade助手升级Gradle时.没有任何React。
我不知道还能去哪里找办法摆脱这一切。

ifsvaxew

ifsvaxew1#

目前,由于flutter升级到版本3.16,pdfx软件包出现问题,如本期https://github.com/ScerIO/packages.flutter/issues/448所述
有一种临时的方法可以解决这个问题,方法是将pubspec.yaml中的pdfx包从pdfx: ^2.4.0更改为

pdfx: 
  git:
   url: 'https://github.com/ScerIO/packages.flutter' 
   ref: '4be9de9ffed5398fd7d5f44bbb07dcd3d3f1711b'  
   path: packages/pdfx

字符串

相关问题