Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

java.exe has exited with code 1. Type a.a.a is defined multiple times #225

Open
gil-rodrigues opened this issue Jan 14, 2022 · 3 comments
Open

Comments

@gil-rodrigues
Copy link

Type of project

Xamarin Forms with both Xamarin.Forms.Android and Xamarin.Forms.iOS project

Xamarin version

4.8.0.1821

Android TargetFramework

v11.0

FacebookComponents Android Version

11.2.0.1 (Version 7.1.0 worked fine)

Description

After installing the nuget and performing the configuration steps in https://developers.facebook.com/docs/android/getting-started/.

When I try to build the app, I get the Error: "java.exe has exited with code 1".

After switching MSBuild output verbosity to Detailed, the following line appears in the output:
Type a.a.a is defined multiple times: obj\Debug\110\lp\130\jl\bin\classes.jar:a/a/a.class, obj\Debug\110\lp\54\jl\bin\classes.jar:a/a/a.class

I am not sure how to understand these classes.jar files, but I believe the first has a reference to the package com.google.gson, and the other has a reference to com.google.android.finsky.

Another SDK in our project is the cause of conflict, because if I remove reference to it, the project runs without problem.
That SDK was provided to us in Java and the binding to the aar file was performed by us. Also, the authors are not able to assist us in the troubleshooting.

Note: The SDK provides indispensable functionality to our app.

MWE

I am unable to provide a MWE, because of confidenciality.
However, I do have one, and I can provide more data if needed.

My goal with this issue

I understand this is a very specific problem. But do you have any experience of other SDK or dependencies that conflicted with Facebook in Xamarin?

Maybe someone can point me in the right direction to search for conflict in the name of classes.

I cannot understand why the classes have the name a.a.a, since I have low to no experience with Java. Can you provide some explanation?

Thank you in advance for your support.

@mauro3005
Copy link

Same issue here, previously 7.1.1 version working fine. Update to 11.2.0.1 for xamarin.facebook.core.android and java exit code 1

@tentom
Copy link

tentom commented Jan 21, 2022

This sounds like a dependency in the binding that should be its own NuGet instead of being compiled into your bindings.

If the Xamarin/FacebookComponents has the dependency compiled should also be extracted to a common dependency.

@gil-rodrigues
Copy link
Author

Hi @tentom

I think I understood what you mean, however I do not have control of the facebook component. Regarding the bindings of the other SDK, I do not have the slightest idea how to make changes :)
Can you point me to any documentation or help?

Thank you

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