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

x/mobile: multiple libraries in android #56567

Closed
DAT4 opened this issue Nov 4, 2022 · 5 comments
Closed

x/mobile: multiple libraries in android #56567

DAT4 opened this issue Nov 4, 2022 · 5 comments
Labels
mobile Android, iOS, and x/mobile Unfortunate
Milestone

Comments

@DAT4
Copy link

DAT4 commented Nov 4, 2022

This question I made originally on stackoverflow - but I never got any reply.


I am trying to use two different go packages in my android app project

I am using gomobile and each package is compiled with

gomobile bind --target=android

They are imported like this

implementation files("libs/packageone.aar")
implementation files("libs/packagetwo.aar")

and they work separateley, but they conflict when i try to run the app.

and I get the following error

Duplicate class go.Seq found in modules jetified-packageone-runtime (packageone.aar) and jetified-packagetwo-runtime (packagetwo.aar)
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Nov 4, 2022
@gopherbot gopherbot added this to the Unreleased milestone Nov 4, 2022
@hyangah
Copy link
Contributor

hyangah commented Nov 4, 2022

Unfortunately, that won't work.
The recommended workaround is to bind both packageone and packagetwo at once, and build one .aar.

@hyangah hyangah closed this as completed Nov 4, 2022
@zhcandroid
Copy link

@DAT4 请问题这个问题解决了吗 我也遇到了同样的问题!

@DAT4
Copy link
Author

DAT4 commented Aug 30, 2023

@zhcandroid 你必须将你的模块组合成一个 - 问题还没有解决 !

english: You need to combine your modules to one. The problem is not resolved.

@MrKrisYu
Copy link

About using multiple aar in as, i offer a solution, more details see my fork: https://github.com/MrKrisYu/mobile

@castletaste
Copy link

It's still an unresolved problem. Why is the issue closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile Unfortunate
Projects
None yet
Development

No branches or pull requests

6 participants