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

The built failed likely due to AndroidX incompatibilities in a plugin. #56693

Closed
baski1978 opened this issue May 8, 2020 · 5 comments
Closed

Comments

@baski1978
Copy link

baski1978 commented May 8, 2020

I am getting some plugin compatibility error while building my fluter fire store app using a mobilenumber plugin.

C:\flutter\fp\audience_poll\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:20: error: no suitable method found for add(MobileNumberPlugin)
    flutterEngine.getPlugins().add(new com.example.mobile_number.MobileNumberPlugin());
                              ^
    method PluginRegistry.add(FlutterPlugin) is not applicable
      (argument mismatch; MobileNumberPlugin cannot be converted to FlutterPlugin)
    method PluginRegistry.add(Set<FlutterPlugin>) is not applicable
      (argument mismatch; MobileNumberPlugin cannot be converted to Set<FlutterPlugin>)
1 error

FAILURE: Build failed with an exception.

BUILD FAILED in 8s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...
Finished with error: The plugin cloud_firestore could not be built due to the issue above.
[flutter build error.txt](https://github.com/flutter/flutter/files/4600442/flutter.build.error.txt)
@baski1978

This comment has been minimized.

@jeffque
Copy link
Contributor

jeffque commented May 9, 2020

So, this message is a somewhat "default" message when build misbehave. See, sqflite had this same message back in version 1.1.7

I think that some example package had this error handle and a lot of packages derived from it get this awful message. Maybe it has nothing to do with AndroidX, as was with all of my builds back in 2019. It is (mostly) just a misleading message

@jeffque
Copy link
Contributor

jeffque commented May 9, 2020

Also, check for flutter/plugins#2231, where a bunch of plugins had this message removed.

It was opened in 2019-oct and landed also in 2019-oct, so just a bit more than 6 months old. Maybe you should upgrade your plugin?

@iapicca
Copy link
Contributor

iapicca commented May 11, 2020

Hi @baski1978
you may want to double check
that your project implements androidX migration correctly;

for what I can see the issue is related to a FlutterFire plugin,
please open the issue in the dedicated github.
Closing, as this isn't an issue with Flutter itself,
if you disagree please write in the comments and I will reopen it
thank you

@iapicca iapicca closed this as completed May 11, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants