mvvmcross xamarin android full fragging - xamarin

My xamarin android project uses fragments so i added the dll "Mvvmcross - MvvmCross.HotTuna.Droid.FullFragging 3.5.1" from nuget. When i tried to build my project, i am getting the following errors. Not sure whats wrong. Could someone help me please.Attached screenshot shows the references that i have for my project.
Error XA4204: Unable to resolve interface type 'Cirrious.MvvmCross.Views.IMvxView`1<TViewModel>'.
Are you missing an assembly reference? (XA4204)Error XA4204: Unable to resolve interface type 'Cirrious.MvvmCross.Droid.Views.IMvxAndroidView`1<TViewModel>'. Are you missing an assembly reference? (XA4204)

Related

Xamarin Binding Library - missing Java references

We have a couple of ELO touch tablets and status lights and a jar file ("eloperipherallib.jar") to change the color of the status light. Though we are not Java developers, we were able to create an .apk (with Android Studio) and change the color of the status light using this jar.
We now want to do the same in .NET, using Xamarin. We therefore created an "Android Bindings Library (Xamarin)" and added the jar (following the instructions here: https://learn.microsoft.com/en-us/xamarin/android/platform/binding-java-library/binding-a-jar). When building the bindings library we get the following warnings:
warning BG8605: The Java type 'android.elo.peripheral.ELOPeripheralEventListener' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
warning BG8605: The Java type 'android.elo.peripheral.ELOPeripheralManager' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
warning BG8606: Some types or members could not be bound because referenced Java types could not be found. See the 'java-resolution-report.log' file for details.
And at runtime we get a similar exception when "ELOPeripheralManager" is used.
Now, we do not have this problem in the .apk created with Android Studio, so I guess the jar file contains everything that is needed. We just can't figure out what the Xamarin project is missing, if that what's missing is in the jar file anywhere and/or how we can get it out of the jar file and put it in the Xamarin project so it'll build…
Can someone point us in the right direction?

Error MT2001: Could not link assemblies. Reason: Error while processing references

I'm getting this error trying to build a Xamarin.iOS project referencing a .NET Standard 2.0 library.
None of the MT2001 issues online seem to have this specific "Error while processing references" reason, so I'm at a loss as to how to diagnose this. I've tweaked and fiddled about as much as any one person can and stay sane, but I'm really in the dark.
Can anyone out there point me in a direction?
Adding -v -v -v -v to "Additional mtouch arguments" in the project iOS Build settings will help diagnose the issue. After that, you can search the build output for MT2001 and view the inner exceptions. Obviously, each project may differ as to what assembly causes the linker to fail. You may need to add, remove or fix your references based on the output.
For example, I was trying to use SignalR from AspNetCore 2.1, which has a dependency on System.Threading.Tasks.Extensions 4.5.1 in my project, which it seems Mono does not yet support. Mono does not provide its own version of the assembly yet, so when mtouch goes to link the assembly, it's unable to do so and throws an exception:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
Removing all references to this assembly (and therefore the whole feauture in my case) allowed the build and linking to succeed.
I've found that I get this when using a Xamarin library that is dependent on System.Reactive 4.1.0. There's a bug in there associated with System.Threading.Tasks.Extensions, and since it is a library I'm writing, I had to roll back to System.Reactive 4.0.0.
For me the error is as follows.
one of the package is mentioned in package.config file but it was not available in packages. So i added the missing package from nuget and the app works fine

MTOUCH: error MT0034 Xamarin.iOS and Catel

I am getting this error when I try to compile my Xamarin.iOS app. I am referencing Catel.MVVM and Catel.Fody.
Any idea what to do?
MTOUCH: error MT0034: Cannot include both 'monotouch.dll' and 'Xamarin.iOS.dll' in the same Xamarin.iOS project - 'Xamarin.iOS.dll' is referenced explicitly, while 'monotouch.dll' is referenced by 'Catel.MVVM, Version=4.4.0.0, Culture=neutral, PublicKeyToken=null'.
One of your project parts uses the UnifiedAPI (Xamarin.iOS.dll) and another one uses the Classic API (monotouch.dll). They can not be both part of the project.
You goal should be to use the UnifiedAPI/ Xamarin.iOS.dll instead of the old monotouch assembly because with the new one you are able to get your app in the store. Xamarin Studio is able to convert your project to the UnifiedAPI. I am not sure but take a look under Project > "Convert to UnifiedAPI" or something like that.

Xamarin.Forms with custom renderer for Android yields compiler error

After upgrading to Xamarin.Forms 1.2.3 I'm getting the following compiler error related to the definition of a custom renderer:
Error CS0012: The type `Xamarin.Forms.Platform.Android.FormsViewGroup' is
defined in an assembly that is not referenced. Consider adding a reference to
assembly `FormsViewGroup, Version=1.2.3.0, Culture=neutral,
PublicKeyToken=null' (CS0012) (XFormsNavigation.Android)
What is wrong and how can I fix it?
Not sure, why you have to add a Xamarin.Forms library manually. But here's what to do:
In packages/Xamarin.Forms.1.2.3.6256-pre4/lib/MonoAndroid10/ (or similar depending on your Xamarin.Forms version) you'll find the library FormsViewGroup.dll. Add it to the references of your Android project and it should compile.

Assembly generation failed - does not have a strong name

Im getting the following error in the Portable Class Library (PCL) in Xamarin, how to resolve this,?
Assembly generation failed -- Referenced assembly 'Xamarin.Forms.Core' does not have a strong name
Xamarin.Forms assemblies distributed through nuget.org are not strong-signed.
You're trying to strong-sign your application assembly, and this require all dependencies to be strong-signed too. That's the problem you're seeing.
IMHO, strong-signing application adds none to very little value in mobile, esp on Android and iOS.

Resources