Skip to content

error: cannot find symbol import io.flutter.plugin.common.PluginRegistry.Registrar; #265

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

Open
tony123S opened this issue Feb 21, 2025 · 6 comments

Comments

@tony123S
Copy link

C:\Users\nick_\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_uploader-3.0.0-beta.4\android\src\main\java\com\bluechilli\flutteruploader\FlutterUploaderPlugin.java:18: error: cannot find symbol
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
  symbol:   class Registrar
  location: interface PluginRegistry
C:\Users\nick_\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_uploader-3.0.0-beta.4\android\src\main\java\com\bluechilli\flutteruploader\FlutterUploaderPlugin.java:46: error: cannot find symbol
  public static void registerWith(Registrar registrar) {
                                  ^
  symbol:   class Registrar
  location: class FlutterUploaderPlugin
2 errors

FAILURE: Build failed with an exception.

How can we by pass this issue?

@onihei
Copy link

onihei commented Feb 21, 2025

This is due to the removal of Android Embedding API v1.
Since this plugin has already migrated to v2, you only need to remove the registerWith function.

Reference:
Flutter Docs - Android v1 Embedding Deprecation
GitHub Pull Request: Remove references to v1 embedding

@amanjha7096
Copy link

@tony123S I am also getting same error

@tony123S
Copy link
Author

@tony123S I am also getting same error

use flutter 3.27 instead of 3.29

@wishescsnow
Copy link

@tony123S @i-aman-jha For those looking for temporary solution and need to be in Flutter 3.29, you can use my fork for the meantime.

flutter_uploader:
    git:
      url: https://github.com/wishescsnow/flutter_uploader_embedding_v2.git
      ref: main

@CodeWithKamal
Copy link

@tony123S @i-aman-jha For those looking for temporary solution and need to be in Flutter 3.29, you can use my fork for the meantime.

flutter_uploader:
git:
url: https://github.com/wishescsnow/flutter_uploader_embedding_v2.git
ref: main

Not working on android, even after adding namespace in build.gradle file. please help.

@Ragavarshithan
Copy link

C:\Users\rakki\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_uploader-3.0.0-beta.4\android\src\main\java\com\bluechilli\flutteruploader\FlutterUploaderPlugin.java:46: error: cannot find symbol
public static void registerWith(Registrar registrar) {
^
symbol: class Registrar
location: class FlutterUploaderPlugin
1 error
3 warnings

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':flutter_uploader: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 14s
i got same error. anyone can help to solve this

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

6 participants