syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.44k stars 672 forks source link

Not able to compile the latest version #1847

Open Charlinjoeaht opened 2 weeks ago

Charlinjoeaht commented 2 weeks ago

Bug description

while compiling the following error is coming

../../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_pdfviewer-25.1.42/lib/src/common/pdfviewer_plugin.dart:157:10: Error: The method 'getTileImage' isn't defined for the class 'PdfViewerPlatform'.

FAILURE: Build failed with an exception.

Steps to reproduce

  1. In pubspec.yaml, the following dependency are added

    dependencies:
    flutter:
    sdk: flutter
    
    #Manage PDF documents
    syncfusion_flutter_pdf: ^25.1.42
    syncfusion_flutter_pdfviewer: ^25.1.42
  2. Compile and run the flutter application

On which target platforms have you observed this bug?

Android, iOS

Flutter Doctor output

Doctor output ```console [✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-IN) • Flutter version 3.19.6 on channel stable at /Users/charlin/Documents/software/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 54e66469a9 (2 weeks ago), 2024-04-17 13:08:03 -0700 • Engine revision c4cd48e186 • Dart version 3.3.4 • DevTools version 2.31.1 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/charlin/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) [✓] Android Studio (version 2023.3) • Android Studio at /Users/charlin/Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) [✓] IntelliJ IDEA Community Edition (version 2024.1.1) • IntelliJ at /Users/charlin/Applications/IntelliJ IDEA Community Edition.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart [✓] Connected device (3 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.119 [✓] Network resources • All expected network resources are available. • No issues found! ```
irxyad commented 1 week ago

did u fixed?

Charlinjoeaht commented 1 week ago

For now, I am using the following dependency to avoid the above said problem

  syncfusion_flutter_pdf: ^24.2.8
  syncfusion_flutter_pdfviewer: ^24.2.8
mehdico commented 1 week ago

I have the exact same issue.

immankumarsync commented 1 week ago

@Charlinjoeaht & @mehdico, we suggest you clear pub cache (C:\Users[Username]\AppData\Local\Pub\Cache\hosted\pub.dev), clean the project, run pub upgrade, and check whether the issue is resolved.

You can also try the solution from this issue #1745

mehdico commented 1 week ago

Hi @immankumarsync , I’m using an Apple Silicon MacBook, and I have tried running dart pub cache clean and my code again, but the error persists.

I have tested all versions from 24.2.9 to 25.1.42. While version 24.2.9 works fine, all newer versions (25.x.x) are triggering the getTileImage error.

mehdico commented 1 week ago

This resolved my issue:

dependency_overrides:
    syncfusion_pdfviewer_platform_interface: ^25.1.42

I think it should be added to the documentations or setup guide.

Charlinjoeaht commented 1 week ago

@Charlinjoeaht & @mehdico, we suggest you clear pub cache (C:\Users[Username]\AppData\Local\Pub\Cache\hosted\pub.dev), clean the project, run pub upgrade, and check whether the issue is resolved.

You can also try the solution from this issue #1745

Still the problem exists

immankumarsync commented 1 week ago

Hi @Charlinjoeaht, could you please follow the below steps and confirm us whether the issue is resolved?

  1. Cleaning the pub cache (By default, this directory is located under $HOME/.pub-cache (on macOS and Linux), or in %LOCALAPPDATA%\Pub\Cache (on Windows))
  2. Run flutter clean from the project directory
  3. Run flutter pub upgrade
Charlinjoeaht commented 1 week ago

Hi @Charlinjoeaht, could you please follow the below steps and confirm us whether the issue is resolved?

  1. Cleaning the pub cache (By default, this directory is located under $HOME/.pub-cache (on macOS and Linux), or in %LOCALAPPDATA%\Pub\Cache (on Windows))
  2. Run flutter clean from the project directory
  3. Run flutter pub upgrade

No this is not solving the issue for me

EvertonMJunior commented 5 days ago

I have the exact same issue. This solved it, but it's a workaround

This resolved my issue:

dependency_overrides:
    syncfusion_pdfviewer_platform_interface: ^25.1.42

I think it should be added to the documentations or setup guide.

immankumarsync commented 4 days ago

@Charlinjoeaht, could you please confirm us whether the issue is resolved using the suggestions shared above?