Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Error XA4212 when trying to build the project #12

Open
malthuis opened this issue Jan 4, 2021 · 2 comments
Open

Error XA4212 when trying to build the project #12

malthuis opened this issue Jan 4, 2021 · 2 comments

Comments

@malthuis
Copy link

malthuis commented Jan 4, 2021

When I try to build my Xamarin.Android project, I get the following error:

error XA4212: Type Com.Mapbox.Services.Android.Location.LostLocationEngine implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.

I was successful mitigating this error by putting the following in my project file:
<PropertyGroup> <AndroidErrorOnCustomJavaObject>false</AndroidErrorOnCustomJavaObject> </PropertyGroup>

But if I do that, the app just crashes with: "'java.exe' exited with code 1".

@malthuis
Copy link
Author

malthuis commented Jan 6, 2021

Details from the build log:

Error in obj\Debug\90\lp\1\jl\gson.jar:com/google/gson/annotations/JsonAdapter.class:
Type com.google.gson.annotations.JsonAdapter is defined multiple times: obj\Debug\90\lp\1\jl\gson.jar:com/google/gson/annotations/JsonAdapter.class, obj\Debug\90\lp\2\jl\gson-2.8.0.jar:com/google/gson/annotations/JsonAdapter.class

@SagarPanwala
Copy link

@malthuis Have you figured this out ? I'm facing same problem.

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

2 participants