Following along in the N=26 presentation for fragments, I am running into a problem where the SupportFragmentManager is not able to be resolved:
I have MVVMCross and all dependencies (3.5.0), MVVMCross fragment support (3.5.0), and Xamarin Support Library v4 (21.0.3.0) added from NuGet with the references showing up properly in the project.
I also find the same issues with the project at https://github.com/MvvmCross/NPlus1DaysOfMvvmCross/tree/b405eef7dddf4d65b00116e142855653eae9f06b/N-26-Fraggle
Any ideas why this may be happening?
Check if your target API level and minimum API level are lower than 14. If yes, probably you will need to use Support V4:
using FragmentManager = Android.Support.V4.App.FragmentManager;
I hope you will solve.
Related
I want to clear some troubles with adding MVVM cross 7.0.0 in an empty project (Xamarin.Forms). I had followed this guide from MVVM cross docs: https://www.mvvmcross.com/documentation/tutorials/tipcalc/a-xamarin-forms-version
By the way, they didn't add actual MVVM cross ver for this tutorial :( So now I'm facing issue with the invalid package name in Forms Android project, so I couldn't use "MvxFormsAndroidSetup" and "MvxFormsAppCompatActivity".
Does someone know how to fix it?
VS error img
You are getting the error because your Android Project targetting monodroid9.0 or lower. When you're upgrading to MvvmCross 7.x, you have to set your Android-Target version to monodroid10.0 or higher. As you can see in the picture, with android 9, it didn't recognize the mvvmcross-nugget.
Look at the release-news to see all changes;
I have created a Xamarin Android project. Via NuGet, I have added a reference to the Grpc package.
In my activity, I want to create a Grpc.Core.Server instance, but it won't let me because of the following runtime error:
System.IO.FileNotFoundException: Error loading native library. Not found in any of the possible locations: /storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/libgrpc_csharp_ext.x64.so,/storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/runtimes/linux/native/libgrpc_csharp_ext.x64.so,/storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/../../runtimes/linux/native/libgrpc_csharp_ext.x64.so
I haven't been able to find any information on this for Xamarin, only iOS, so I am hoping someone here can provide a suggestion on how to proceed.
Please note that gRPC c# support for Xamarin is currently experimental. The stable packages in nuget.org don't provide the support yet (that will change with the upcoming v1.15.x release).
See HelloWorldXamarin instructions on how to obtain the correct nuget package (or use the https://www.nuget.org/packages/Grpc.Core/1.15.0-pre1 pre-release package which already supports Xamarin):
https://github.com/grpc/grpc/tree/master/examples/csharp/HelloworldXamarin#experimental-only
You might also need this workaround if you are using Xamarin.Forms: https://github.com/grpc/grpc/issues/16250
I'm a newbie in Xamarin and in the past few days I have been trying to bind the Meridian Android SDK (meridianapps.com). In the documentation the SDK requires 2 external libraries (via gradle) that are:
com.mcxiaoke.volley:library:1.0.9
com.squareup:otto:1.3.5
Using the extension this I added this 2 references in the Xamarin project. The volley library initial gives some compiling errors that I solved using the entries in pastebin.com/qqLqy0AA in configurations in the Transforms/Metadata.xml that I found here.
The otto library I can't solve the problem and that's why i require some help
In the link pastebin.com/NeNsx29P it´s the output of the compiling of the binding project with the Meridian SDK and the 2 dependencies.
And in the link pastebin.com/V2ia8GVh I try to make the binding with the proper dependencies added
Thank you,
Nuno
Note: Sorry for the links but for now i only can post 2 links per post. Later I will edit the post.
I have tricky question about SignaturePad updated to Xamarin Forms 2.0, link to GitHub:
https://github.com/mrbelk/acr-xamarin-forms
I did manage to download repo and build it, however I have no idea how to produce proper DLLs that I could use in my project?
The main issue is that SignaturePadView is treated as Xamarin Forms View class instead of Android View, so there is different constructors, methods, etc.
Does smb know how to build these projects to produce proper dlls that iOS/Android solution will treat SignaturePadView as Android View and iOS UIView respectively?
Don't use acr.* any more if you want to save yourself some pain. I had to pull their camera implementation out of one of my apps due to no support for forms 2.0+.
Replace acr with supported NuGets like Plugin.Media and the others found here. For this particular issue no one has created a non-deprecated NuGet so there is this plugin as an option.
Apparently, it happens that we have actually used SignaturePad from https://components.xamarin.com/view/signature-pad but via acr.* nuget package.
What I found in my quick research that both acr.xamforms.SignaturePad and SignaturePad it self were in acr nuget package, and actually we were using components from SignaturePad, luckily. So I did remove this nuget from sln to get rid of acr.* components and add SignaturePad from xamarin components by hand.
Now we are able to use Xamarin Forms 2.0 without any problems.
Cheers,
G
I started a new default working project in xamarin and I added the dll references for Xamarin.Android.Support.V4 and Xamarin.Android.Support.V7.AppCompat and I am getting errors.
Error: package android.support.v4.app.FragmentManager does not exist
android.support.v4.app.FragmentManager.OnBackStackChangedListener
Error: package android.support.v4.content.Loader does not exist
android.support.v4.content.Loader.OnLoadCompleteListener
...
What have I done wrong?
You needed to actually install the support library. MonoDroid has .NET bindings for it, but the underlying java can't build without it, of course. Here are instructions for getting the support library and instructions for hooking it up to a MonoDroid project.
See also http://developer.xamarin.com/Guides/Android/Platform_Features/Fragments/Part_4_-_Providing_Backwards_Compatibility_with_the_Android_Support_Package/#Adding_The_V4_Libraries_to_a_Mono_for_Android_Project
This might be related to this or this, which were solutions to common problems in the rev. 22 update.
try calling it with this:
using Android.Support.V4;
I was reading another post in the xamarin forms with the same issue and this worked for me. I spent maybe an hour trying to figure out what to do and the guy I ran into said just to:
clean the solution,
rebuild it,
then it should be fixed.
Assuming the packages are still installed