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

Does not compile with Flutter 3.29 #375

Open
srappose opened this issue Feb 13, 2025 · 5 comments
Open

Does not compile with Flutter 3.29 #375

srappose opened this issue Feb 13, 2025 · 5 comments

Comments

@srappose
Copy link

After upgrading flutter from 3.27.4 to 3.29, it is no more possible to build an application using flutter_barcode_scanner, having the following message:
...
...
[My_user_path]\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_barcode_scanner-2.0.0\android\src\main\java\com\amolg\flutterbarcodescanner\FlutterBarcodeScannerPlugin.java:71: error: cannot find symbol
private FlutterBarcodeScannerPlugin(FlutterActivity activity, final PluginRegistry.Registrar registrar) {
^
symbol: class Registrar
location: interface PluginRegistry
[My_user_path]\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_barcode_scanner-2.0.0\android\src\main\java\com\amolg\flutterbarcodescanner\FlutterBarcodeScannerPlugin.java:78: error: cannot find symbol
public static void registerWith(final PluginRegistry.Registrar registrar) {
^
symbol: class Registrar
location: interface PluginRegistry
[My_user_path]\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_barcode_scanner-2.0.0\android\src\main\java\com\amolg\flutterbarcodescanner\FlutterBarcodeScannerPlugin.java:244: error: cannot find symbol
final PluginRegistry.Registrar registrar,
^
symbol: class Registrar
location: interface PluginRegistry
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':flutter_barcode_scanner:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --info option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1m 40s
Error: Gradle task assembleDevDebug failed with exit code 1

Exited (1).

...

@decodevM
Copy link

@srappose

🚀 Migration Update: Flutter 3.29 🚀

We’ve completed the migration in #376 ! 🎉 You can check out the changes in the flutter-3.29 branch.

🔍 How to Test:
1. Pull the latest changes from flutter-3.29.
2. Run your tests and verify that everything works as expected.
3. If you encounter any issues, please open a new issue with detailed steps to reproduce.

Your feedback is valuable! Let us know if anything needs improvement. 💡🔥

@srappose
Copy link
Author

@decodevM

Hi,
I have tried your branch in my project and that build error disappears. Unfortunately I can not still build my project because there are other plugins affected by the same problem...

@decodevM
Copy link

@srappose
Hi,
Can you share your build error?

@srappose
Copy link
Author

srappose commented Feb 14, 2025

Hi,

your fix works on my project.
What I wrote is to highlight that this update to Flutter 3.29 caused the same problem for other plugins too.
This is an interesting article that describes what has happened with this new flutter version: https://benamorn.medium.com/today-i-learned-after-upgrading-to-flutter-3-29-0-7c7ab1a97975.

Anyway, here is an excerpt of my build error with open_file_plus plugin (https://pub.dev/packages/open_file_plus):

...
[My_user_path]\AppData\Local\Pub\Cache\hosted\pub.dev\open_file_plus-3.4.1+1\android\src\main\java\com\joutvhu\openfile\OpenFilePlusPlugin.java:66: error: cannot find symbol

public static void registerWith(PluginRegistry.Registrar registrar) {

                                              ^

symbol: class Registrar

location: interface PluginRegistry
...

This is the link of the related issue: joutvhu/open_file_plus#22

@MDias04
Copy link

MDias04 commented Feb 15, 2025

When will this be merged?

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

3 participants