Skip to content

error: cannot find symbol flutterEngine.getPlugins().add(new io.sentry.flutter.SentryFlutterPlugin()); #2870

@furkandvrc

Description

@furkandvrc

Platform

Flutter Mobile Android

Obfuscation

Disabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel stable, 3.29.2, on macOS 15.3.2 24D81 darwin-arm64, locale en-TR) [3.0s]
• Flutter version 3.29.2 on channel stable at /Users/furkandivarci/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c236373904 (5 weeks ago), 2025-03-13 16:17:06 -0400
• Engine revision 18b71d647a
• Dart version 3.7.2
• DevTools version 2.42.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [4.4s]
• Android SDK at /Users/furkandivarci/Library/Android/sdk
• Platform android-35, build-tools 35.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [4.5s]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16E140
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [10ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.3) [9ms]
• 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 21.0.5+-13047016-b750.29)

[✓] VS Code (version 1.93.0) [8ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.104.0

[✓] Connected device (4 available) [16.5s]
• 2107113SR (mobile) • 3de6147e • android-arm64 • Android 14 (API 34)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.3.2 24D81 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.3.2 24D81 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 135.0.7049.85

[✓] Network resources [417ms]
• All expected network resources are available.

• No issues found!

Version

8.14.1 but every version except alpha version has the same error

Steps to Reproduce

I type flutter run --release and this error occurs

flutter clean
flutter pub cache clean/repair
change sentry version
delete GeneratedPluginRegistrant
I tried everything

Expected Result

to get a proper build?

Actual Result

 Compilation mode: in-process compilation
[        ] Transforming libs.jar with JetifyTransform
[        ] Transforming libs.jar with IdentityTransform
[        ] Transforming core-for-system-modules.jar with JdkImageTransform
[        ] Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
[        ] Compiling with toolchain '/Applications/Android Studio.app/Contents/jbr/Contents/Home'.
[        ] file or directory '/Users/furkandivarci/Documents/projects/karaca-app/android/app/src/release/java', not found
[        ] Compiling with JDK Java compiler API.
[        ] /Users/furkandivarci/Documents/projects/karaca-app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:224: error: cannot find symbol
[        ]       flutterEngine.getPlugins().add(new io.sentry.flutter.SentryFlutterPlugin());
[        ]                                                           ^
[        ]   symbol:   class SentryFlutterPlugin
[        ]   location: package io.sentry.flutter
[        ] 1 error

Are you willing to submit a PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions