Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilação falha ao tentar abrir um arquivo com PDFDocumento.fromFile #44

Open
ReniDelonzek opened this issue Nov 9, 2019 · 0 comments

Comments

@ReniDelonzek
Copy link

Quando tento fazer uso do plugin conforme descrito no título, a compilação do app falha, exibindo a seguinte mensagem:

Compiler message:
../../../Programas/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_pdf_viewer-1.0.6/lib/src/page.dart:33:26: Error: The argument type 'Null Function(dynamic, dynamic)' can't be assigned to the parameter type 'ImageStreamListener'.

  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('../../../Programas/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    resolver.addListener((imgInfo, alreadyPainted) {
    ^
    Exception: Errors during snapshot creation: null
    #0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart:182:7)
#1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:526:25) #2 _BuildInstance.invokeTarget. (package:flutter_tools/src/build_system/build_system.dart:481:35) #3 new Future.sync (dart:async/future.dart:222:31) #4 AsyncMemoizer.runOnce (package:async/src/async_memoizer.dart:43:45) #5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:481:21) #6 BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:419:36) #7 buildWithAssemble (package:flutter_tools/src/bundle.dart:125:48) #8 BundleBuilder.build (package:flutter_tools/src/bundle.dart:75:11) #9 BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:126:25) #10 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:556:18) #11 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:456:33) #12 AppContext.run. (package:flutter_tools/src/base/context.dart:157:29) #13 _rootRun (dart:async/zone.dart:1124:13) #14 _CustomZone.run (dart:async/zone.dart:1021:19) #15 _runZoned (dart:async/zone.dart:1516:10) #16 runZoned (dart:async/zone.dart:1463:12) #17 AppContext.run (package:flutter_tools/src/base/context.dart:156:18) #18 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:446:20) #19 CommandRunner.runCommand (package:args/command_runner.dart:197:27) #20 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:416:21) #21 AppContext.run. (package:flutter_tools/src/base/context.dart:157:29) #22 _rootRun (dart:async/zone.dart:1124:13) #23 _CustomZone.run (dart:async/zone.dart:1021:19) #24 _runZoned (dart:async/zone.dart:1516:10) #25 runZoned (dart:async/zone.dart:1463:12) #26 AppContext.run (package:flutter_tools/src/base/context.dart:156:18) #27 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:367:19) #28 CommandRunner.run. (package:args/command_runner.dart:112:25) #29 new Future.sync (dart:async/future.dart:222:31) #30 CommandRunner.run (package:args/command_runner.dart:112:14) #31 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:251:18) #32 run.. (package:flutter_tools/runner.dart:63:22) #33 _rootRun (dart:async/zone.dart:1124:13) #34 _CustomZone.run (dart:async/zone.dart:1021:19) #35 _runZoned (dart:async/zone.dart:1516:10) #36 runZoned (dart:async/zone.dart:1500:12) #37 run. (package:flutter_tools/runner.dart:61:18) #38 AppContext.run. (package:flutter_tools/src/base/context.dart:157:29) #39 _rootRun (dart:async/zone.dart:1124:13) #40 _CustomZone.run (dart:async/zone.dart:1021:19) #41 _runZoned (dart:async/zone.dart:1516:10) #42 runZoned (dart:async/zone.dart:1463:12) #43 AppContext.run (package:flutter_tools/src/base/context.dart:156:18) #44 runInContext (package:flutter_tools/src/context_runner.dart:65:24) #45 run (package:flutter_tools/runner.dart:50:10) #46 main (package:flutter_tools/executable.dart:65:9) #47 main (file:///Users/reni/Downloads/Programas/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3) #48 _startIsolate. (dart:isolate-patch/isolate_patch.dart:303:32) #49 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Failed to build bundle.

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/reni/Downloads/Programas/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 782

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

Process 'command '/Users/reni/Downloads/Programas/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 16s
Finished with error: Gradle task assembleDebug failed with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant