Duplicate Reference Makes Project Build Error?

Hi, my project reference Mono.Android.Support.v4 and works fine.
When I addon the component ZXing.Net.Mobile to project, I can't build and got error message:


Error 9 Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
filename: 'Xamarin.Android.Support.v4.dll'
from Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
from Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)

from Xamarin.Android.Tasks.ResolveAssemblies.Execute() Test_Project

I think it might be the ZXing.Net.Mobile component reference the same one (Mono.Android.Support.v4) so I can't build,
but I can't remove the reference from ZXing.Net.Mobile.

anyone can help me figure this out or experience for solving this situation?
Thanks.

Posts

  • germosonnergermosonner TWMember

    I do some tests:
    1. Remove ZXing.Net.Mobile component but keep Android.Support.v4 , I can build successful.
    2. add ZXing.Net.Mobile again, build fail, the error still appear.

    Thanks.

  • MircoCortecchia.7167MircoCortecchia.7167 ITUniversity ✭✭

    same problem here

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    I answered a simular question in the Android forum. forums.xamarin.com/discussion/comment/46845/#Comment_46845

    Basically the Xamarin.Android.Support.v4 and Mono.Android.Support.v4 libraries are identical and this leads to the mentioned build errors.

  • germosonnergermosonner TWMember

    I solve the problem.
    I download all used libraries and check theirs reference, it should be some libraries used an older Mono.Android.Support.V4, change them to Xamarin.Android.Support.V4 with no issues when build all.

Sign In or Register to comment.