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

Compilation Error with facebook_app_events Plugin #411

Open
1 task done
master-wayne7 opened this issue Feb 13, 2025 · 15 comments
Open
1 task done

Compilation Error with facebook_app_events Plugin #411

master-wayne7 opened this issue Feb 13, 2025 · 15 comments
Labels
bug🐞 Something isn't working

Comments

@master-wayne7
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Getting a build error on Android for the latest Flutter v3.29.0

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':facebook_app_events:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

Expected Behavior

The plugin should compile successfully with Flutter 3.29.0.

Steps To Reproduce

  1. Create a new Flutter project with Flutter v3.29.0
  2. Add facebook_app_events: ^0.19.5 to pubspec.yaml
  3. Run flutter pub get
  4. Try to build the Android app

Platform

Android

Flutter Doctor

Flutter 3.29.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 35c388afb5 (2 days ago) • 2025-02-10 12:48:41 -0800
Engine • revision f73bfc4522
Tools • Dart 3.7.0 • DevTools 2.42.2

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.29.0, on Microsoft Windows [Version 10.0.19045.5487], locale en-IN)
[√] Windows Version (10 Home Single Language 64-bit, 22H2, 2009)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
[√] Android Studio (version 2024.1)
[√] VS Code (version 1.97.0)
[√] Connected device (4 available)
[√] Network resources

• No issues found!
@master-wayne7 master-wayne7 added the bug🐞 Something isn't working label Feb 13, 2025
@qeepcologne
Copy link

qeepcologne commented Feb 13, 2025

e: file:///home/bwahlen/.pub-cache/git/flutter_facebook_app_events-18151e4e6aae803fdb162bebba363d0be6402ab3/android/src/main/kotlin/id/oddbit/flutt
er/facebook_app_events/FacebookAppEventsPlugin.kt:16:48 Unresolved reference 'Registrar'.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':facebook_app_events:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

i already tried to delete all caches, plugin definitely not building with flutter 3.29

@master-wayne7
Copy link
Author

We just have to remove the Registar import from the FacebookAppEventsPlugin.kt file, then it will work as expected.

@shovelmn12
Copy link

#412

Created PR with fix

@Nidal-Bakir
Copy link

Same here Unresolved reference: Registrar

e: file:///home/nidal/.pub-cache/hosted/pub.dev/facebook_app_events-0.19.5/android/src/main/kotlin/id/oddbit/flutter/facebook_app_events/FacebookAppEventsPlugin.kt:16:48 Unresolved reference: Registrar

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':facebook_app_events:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

@brian-kayfitz
Copy link

Any way we can help expedite this? Its blocking our team.

@shovelmn12
Copy link

@brian-kayfitz #412

You can use my fork until they merged... it was blocking us too thats why I forked and fixed it

@qeepcologne
Copy link

that's what we're already doing. But then you lose feature from other branch.
I do not want another fork.
please do not forget to merge feature/debug branch.
(i cannot create a pull request because not a collaborator)

@Ankitmahadik
Copy link

facing same issue

@AbdulazizRasulbek
Copy link

same issue

@mohsinnaqvi606
Copy link

mohsinnaqvi606 commented Feb 16, 2025

Flutter does not support this syntax anymore

 error: cannot find symbol
      flutterEngine.getPlugins().add(new id.oddbit.flutter.facebook_app_events.FacebookAppEventsPlugin());

Copy link

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@liuliwei-guru
Copy link

it's a blocking issue since Flutter 3.29.0 released.

@mohsinnaqvi606
Copy link

Any solution for now?

@rignaneseleo
Copy link

Any solution for now?

Use this in your pubspec.yaml:

  facebook_app_events: # temp fix for https://github.com/oddbit/flutter_facebook_app_events/issues/411
    git:
      url: https://github.com/oddbit/flutter_facebook_app_events/
      ref: e5bab0a

@peekaboo212 peekaboo212 marked this as a duplicate of #415 Feb 24, 2025
@sahilasopa
Copy link

Cmon merge it already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests