x/mobile: support multiple independent bindings in the same app #15956
Please answer these questions before submitting your issue. Thanks!
gomobile bind -target=android golang.org/x/mobile/example/bind/halou
I get two aar module，then import them by android studio ，
when I build apk，happen erro messsage
Error:Error converting bytecode to dex:
I know resason that two arr include two jar file，but them have same LoadJNI.class and Seq.class,
I want to know that how to resolve it by good way?
FAILURE: Build failed with an exception.
changed the title
use gomobile bind make aar to my android project，happend jar conflict
Jun 6, 2016
got the identical thing today.
enabling MultDex is possible apparently as fix in Android Studio. But dont knwo too much.
I wonder if devs really need more than one golang dependency in their Android apps ?
Hello, I got the same issue using two go packages that translates into two android modules, but the go directory in the .aar files are identical. Using multidex didn't cut it for me, because I ended up with following error:
I tried to exclude the LoadJNI.class from one of the dependencies using gradle without luck :/
Gomobile doesn't support multiple independent instances in the same app. As @hyangah points out, list multiple packages to
I got the same problem on Android(The two aar supported by different team).
First, I think it is just the problem of .so conflict. So, I modify the source of go-mobile and changed the name of .so just like "libgojniX.so".
Then I got another problem: "duplicate class go.Seq".
Continue to modify the source of go-mobile, change the default package "go" to "go.xxx". Then I got the class go.xxx.Seq.
Import the new aar to the project, It was compiled successfully.
But, when I run the app. It throws some go-runtime error:
Is there any way to decouple them(go-runtime&logic.so)?