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: enable to import multiple aar files compiled by gomobile for one Android Studio project #63483

Open
MrKrisYu opened this issue Oct 10, 2023 · 3 comments
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@MrKrisYu
Copy link

MrKrisYu commented Oct 10, 2023

The goal of this issue

Intended to fix issuse #56567

What do I modify for gomobile

  1. modify mobile/bind/java/Seq.java for extracting the java dependency(common Java dependencies later used for multiple AARs);
  2. mkdir a directory named "libs" for storing common java dependencies;
  3. modify mobile/cmd/gomobile/bind_androidapp.go to not cover go module in the class.jar of the final aar file.
  4. add some descriptions for how to using the new feature.

Details

more details, please see my fork : https://github.com/MrKrisYu/mobile

@seankhliao seankhliao changed the title New feature: support import multiple aar compiled by gomobile into a AndroidStudio Project. x/mobile: support import multiple aar compiled by gomobile into a AndroidStudio Project. Oct 10, 2023
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Oct 10, 2023
@gopherbot gopherbot added this to the Unreleased milestone Oct 10, 2023
@adonovan adonovan removed the pkgsite label Oct 12, 2023
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 13, 2023
@dmitshur
Copy link
Contributor

CC @hajimehoshi.

@hajimehoshi
Copy link
Member

Does iOS have the same issue?

@hajimehoshi hajimehoshi changed the title x/mobile: support import multiple aar compiled by gomobile into a AndroidStudio Project. x/mobile: enable to import multiple aar files compiled by gomobile for one Android Studio project Oct 14, 2023
@viktorstrate
Copy link

@hajimehoshi

iOS gives the following warnings but it works:

objc[16342]: Class GoSeqRef is implemented in both /private/var/containers/Bundle/Application/77FA4478-30D1-4F07-BBA9-24F0DCDBD12F/Example.app/Frameworks/GoLib.framework/GoLib (0x10708fc08) and /private/var/containers/Bundle/Application/77FA4478-30D1-4F07-BBA9-24F0DCDBD12F/Example.app/Example (0x10551fa40).
One of the two will be used. Which one is undefined.

A similar warning is printed for following classes: Universeerror, goSeqDictionary, GoSeqRef, RefCounter, RefTracker.

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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants