1

I am getting this issue while being at latest flutter version and pkg version too.

Here is the log:

/Users/samamamajeed/.pub-cache/hosted/pub.dev/square_in_app_payments-1.7.10/android/src/main/java/sqip/flutter/internal/CardEntryModule.java:73: error: cannot find symbol public CardEntryModule(PluginRegistry.Registrar registrar, final MethodChannel channel) { ^ symbol: class Registrar location: interface PluginRegistry /Users/samamamajeed/.pub-cache/hosted/pub.dev/square_in_app_payments-1.7.10/android/src/main/java/sqip/flutter/internal/GooglePayModule.java:59: error: cannot find symbol public GooglePayModule(PluginRegistry.Registrar registrar, final MethodChannel channel) { ^ symbol: class Registrar location: interface PluginRegistry /Users/samamamajeed/.pub-cache/hosted/pub.dev/square_in_app_payments-1.7.10/android/src/main/java/sqip/flutter/SquareInAppPaymentsFlutterPlugin.java:39: error: cannot find symbol public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) { ^ symbol: class Registrar location: interface PluginRegistry /Users/samamamajeed/.pub-cache/hosted/pub.dev/square_in_app_payments-1.7.10/android/src/main/java/sqip/flutter/SquareInAppPaymentsFlutterPlugin.java:45: error: cannot find symbol private SquareInAppPaymentsFlutterPlugin(io.flutter.plugin.common.PluginRegistry.Registrar registrar) { ^ symbol: class Registrar location: interface PluginRegistry Note: /Users/samamamajeed/.pub-cache/hosted/pub.dev/square_in_app_payments-1.7.10/android/src/main/java/sqip/flutter/internal/GooglePayModule.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/samamamajeed/.pub-cache/hosted/pub.dev/square_in_app_payments-1.7.10/android/src/main/java/sqip/flutter/internal/CardEntryModule.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 4 errors

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':square_in_app_payments:compileDebugJavaWithJavac'.

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Feb 28 at 6:41

1 Answer 1

2

This issue is caused by square_in_app_payments package using deprecated Android v1 embedding. Starting Flutter 3.29.0, Flutter does not support v1 embedding. So the package should be upgraded to support Flutter 3.29.0.

Here's an issue opened in square/in-app-payments-flutter-plugin repo: https://github.com/square/in-app-payments-flutter-plugin/issues/259

You can try

  1. Wait for the new version of package. (You can watch the issue on Github.)
  2. Downgrade Flutter to 3.27.4
  3. Fork and Fix It Yourself: Refer to Flutter’s official migration guide for deprecated plugin APIs here: https://docs.flutter.dev/release/breaking-changes/plugin-api-migration (Copied from the answer below)

This answer might be helpful: https://stackoverflow.com/a/79465363/10202769

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.