Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Jar libraries that have the identical name with inconsistent file contents ERROR

I'm unable to build my app because I'm getting this error:

You have Jar libraries, androidx.lifecycle.lifecycle-common.jar, that have the identical name with inconsistent file contents. Please make sure to remove 
any conflicting libraries in EmbeddedJar, InputJar and AndroidJavaLibrary

I've searched for the androidx.lifecycle.lifecycle-common.jar file and can only find one instance of it within my project.

I've tried deleting the file and renaming the file but this did not work. I'm currently in the middle of trying to migrate to androidX.

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    You can try to remove the support library jar from the project.

  • yuraxyurax RUMember ✭✭

    Same problem. I don't understand how to resolve this issue.

    How "to remove the support library jar from the project" in VS 2019?

  • MiCherMiCher AUMember ✭✭

    Same issue here. After migrating my project to AndroidX a few weeks ago it became unusable. Removing all Support packages did not make any difference. Did anyone find a solution? Please share.

  • MiCherMiCher AUMember ✭✭

    I resolved the issue by deleting Xamarin.AndroidX.Lifecycle.Common.2.x.x folder in solution's /packages folder.
    Try to search for "androidx.lifecycle.lifecycle-common.jar" in Build Output. Most probably you will find the file in two locations with different versions. One is the \packages folder in your solution and another one is the global .nuget cache on your MAC or PC.

Sign In or Register to comment.