-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Integrating multiple flutter modules into an Android application fails #118949
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
Comments
Thanks for the report @rushilsingh The multiple flutter modules you are using could be using dependencies which could be using conflicting class names somehow and hence throwing the reported error:
There's a similar issue open that points to related use case in which you can follow-up for further updates: #117359 |
Thanks for your response @darshankawar The conflicting dependency is flutter itself. The conflicting class name GeneratedPluginRegistrant is coming auto-generated code in the .android folder resulting from the 'flutter build aar' command. |
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 |
Greetings
We are trying to integrate two different flutter modules into our Android application.
We are integrating the modules as AARs as outlined here:
https://docs.flutter.dev/development/add-to-app/android/project-setup
However, we encounter the following error:
Duplicate class com.org1.lib.BuildConfig found in modules jetified-flutter_debug-1.0-runtime (:flutter_module:) and jetified-flutter_debug-1.0-runtime (flutter_module.aar) Duplicate class io.flutter.plugins.GeneratedPluginRegistrant found in the following modules: jetified-flutter_debug-1.0-runtime (:flutter_module:), jetified-flutter_debug-1.0-runtime (flutter_module.aar) and jetified-flutter_release-1.0-runtime (com.org2.sdk:flutter_release:1.0)
I see that there is an existing issue that is related:
#39707
We tried experimenting with the workarounds suggested. However, none of them worked within our constraint i.e. using AAR files for the flutter modules.
Please help.
Thanks.
The text was updated successfully, but these errors were encountered: