Getting errors after updating Xamarin Forms - xamarin

I tried updating Xamarin Forms to a version starting with a 2 for quite some time now. I believe i have tried everything ive found online so thats why i am here.
After updating Xamarin Forms and building in Visual Studio I get the following warning + 3 errors (all these warnings/errors are for my .droid project btw):
Warning The "XamlCTask" task failed unexpectedly. //on iOS
Error Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\User\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\libs/internal_impl-23.0.1.jar doesn't exist.
Error Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\User\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\classes.jar doesn't exist.
Error Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Android resource directory C:\Users\User\AppData\Local\Xamarin\Android.Support.v4\23.0.1.3\embedded\./ doesn't exist.
Then, after building again, i start getting these errors:
35 Times this:
Error error: package android.support.v4.widget.X does not exist
8 times this:
Error error: method Activate in class TypeManager cannot be applied to given types
8 times this:
Error error: cannot find symbol
plus these 4:
Error error: cannot access TaskStackBuilder
Error error: cannot access SupportMenu
Error error: cannot access NestedScrollingParent
Error error: cannot access ActionProvider
Additionally i also still get the iOS warning from earlier.
If i clean and build again at this point, the original 4 messages reappear, and so the circle keeps on going...
I am seriously at wits end right now and i appreciate any help you can give me.
This ive tried:
Pretty much everything from this thread:
https://forums.xamarin.com/discussion/32346/install-android-support-library-available-in-sdk-installer-error-doesnt-leave-us
and everything from here:
https://forums.xamarin.com/discussion/57658/cannot-get-vs-2015-to-build-when-upgrading-to-xamarin-forms-v2-0-0-6490
Plus I have tried a bunch of other things that i am probably forgetting right now.

The XamlC Task errors occur when you upgrade to XF 2.0.1 and 2.1.0 due to new build targets.
They are solved by a simple restart of Visual Studio.
The dll's used by another process sometimes occurs when VS locks on the files aren't correctly released. The only solution to this is to go through all your bin and obj files. Delete them all, then close all instances of VS and start again.
With your Android issues, did you do a complete upgrade on all packages as you aren't meant to with Android Support packages. You will notice Xamarin wants the exact version 23.0.1.3 - don't upgrade to the higher versions. If you have downgrade them.
As for the files it says it can't find at the top. Go to those directories and delete the directories themselves. VS will redownload and rebuild them if they are cleaned out.

Related

"The reference component 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' could not be found." for all under References in VS2017

Using VS2017 and .Net 4.7.2, was trying to update the Extent Reports version. Then updated the MongoDB versions etc. Realized that it was the version not supported. So back to the original version of Extent reports (3.x) and MongoDb version 2.11.x. Now suddenly all the references are giving this error message: The reference component 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' could not be found.
Also, at the end getting this error message: This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..<folder>\packages\MongoDB.Libmongocrypt.signed.1.2.1.1\build\MongoDB.Libmongocrypt.signed.targets.
Btw, There are two projects involved: P1, an automation framework and P2, the test suite. P1 is the issue. P2 is fine, but can not compile since P1 does not compile and creates a dll.. When I updated the version I have been doing for both projects. The versions are compatible.
How to resolve this issue? Also all the references do not have any paths as shown below in pic2.
I have resolved the issues:
Edited the .csproj file, to comment out something that was left over during installing and uninstalling of MongoDB. The error is shown at the bottom of the first screen shot.
Since all or none approach taken in getting up the project references, when one failed all are ignored, hence looked like all references failed. Actually, it's only one reference failed.
However, I'm still stuck with some other issues, for which I'll create another question.

Unable to Resolve Build File: Reference to Missing Target with GUID

I recently forked an iOS library on GitHub to add support to it for the Swift Package Manager. Here's the repository: https://github.com/skelpo/mapbox-gl-native-ios
When I add it to a completely new iOS app and try to build it, I get this error:
Unable to resolve build file: XCBCore.BuildFile (The workspace has a reference to a missing target with GUID 'PACKAGE-TARGET:Mapbox')
I've found posts for similar errors, such as this one, but the reason for the build file failing to resolve is different.
I have tried the usual cleaning the build folder, deleting derived data, and restarting Xcode, but that hasn't helped.
What is the reason for this specific resolution failure, and how would I fix it?
I ran into a similar problem after upgrading to Xcode 12 recently, and found a fix for my case.
A major hint that led to the solution came from Aaron's May 3, 2019 answer on this page.
What fixed it for me was to select the root of the Xcode project, and change the Project Format from "Xcode 11.0-compatible" to "XCode 12.0-compatible".

WatchKit App won't compile: “error: WatchKit Extension doesn't contain any WatchKit apps” on only 1 of 2 machines

I have an issue that has come up before however in this situation I have two development machines and the code build and runs on one machine but not on the other.
I have a MBP and a Mac Pro, the code is in git and once I have built on one machine and committed and pushed to git when the code is fetched on the other machine I receive the error message WatchKit App won't compile: “error: WatchKit Extension doesn't contain any WatchKit apps”.
I have checked bundle identifiers and they all look correct which makes sense as it builds on one machine.
I also downloaded a sample app from Xamarin.com, the WatchTables demo. The bundle identifiers are correct but I am receiving the same build error with that solution.
Any thoughts, I have checked the version of Mono and other frameworks on both machines, Xcode and VSfM are the same version and up to date. Any ideas would be helpful.
After downloading additional updates on the machine that was failing when I went to install and restart an error occurred and VSfM would no longer start. So I reinstalled VSfM again, this allowed it to start and I was able to apply the updates.
Once I started the IDE again I was then able to build the solutions.
I would seem that something had become corrupt with VSfM and until the failure of the updates broke the IDE this wasn't getting sorted.
All is good now.

React Native - React-native link error while linking instabug-reactnative

Here's the packge I am using for bug reporting (I am following the install instructions from here). But when I run react-native link instabug-reactnative it gives me the following error.
I followed some forums but none seemed to help. I guess the error is regarding ruby installation. Any idea What's going on here? Is it trying to link the files for ios and failing? Do I need to even run link command for android
In the installation guide 2 point is the following
2.) Install Ruby. (You can skip this step if you're building for Android only)
As per the instructions, I skipped this step beacause I am building for android only.

Xamarin Android Support V4 error

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

Resources