Xamarin displaying wrong images - xamarin

I have a xamarin forms project that started behaving strangely... It started randomly replacing images with different images from the resource folder. It seems to only be happening in the Android project, iOS is behaving correctly. I've removed the recently added images and readded them, clean, rebuild, nothing sees to be helping. The images that are getting changed are not being overwritten, and the code references the correct file.
Has anyone run into a similar issue before? Thoughts on how to possibly fix this?

It is a common behaviour, What I usually do is:
Restart Xamarin Studio
Go to your project Android location and Delete the bin/Obj folders.
Do a full clean, rebuild of your project
Delete the Android app from the device
This is the my day to day script. Hope it helps!

Related

Xamarin Forms Hot Reload is Not Functioning

I have searched multiple times about this issue and saw thousands of posts here but unfortunately I am still have trouble with the Xamarin Forms Hot Reload while using it on VS.
Any help please??
I have tried every solution but with no success and here are my selections as in the image attached. I have tried also both Changes only & Full Page options but nothing is working. Additionally, I have rebuild my solution many times and my emulator but nothing is functioning. Here are my Hot-reload options.
First of all, update all of your nuget package project to the latest, then close your VS, then delete the 'bin' and 'obj' folders, rebuild and run your project, if it worked as normal.

Xamarin.iOS - Assets won't update

I'm developing a xamarin app for iPads. When I try to change asset for splashscreen/launchscreen, it remains the same no matter what I do on ipads, even tho on storyboard it looks correct. What could possibly be the problem?
I already tried to add the references to project file, clean & rebuild, delete bin and obj files with no results, create new asset and refer to it (it just shows black screen then)
UPD: Problem kinda solved itself when I debugged it on different device, splashscreen was correctly shown. I assume it's a cache issue or something.

Xamarin.iOS 11 Resources are Not Loaded

I recently updated my instance of Visual Studio 2017 to version 15.3.5 and in the process updated Xamarin.iOS to version 11.0.0.0.
Since updating, several of the resources in my project have stopped working. When deploying to a device, the app icon is not displayed (instead blank icon is shown), and Bundle Resources like a custom font file (.tff) is no longer loading. There has been no code changes to the stable branch of our build, but just updating appears to have broken multiple resources.
Has anyone else encountered this? Does the Xamarin team know about this (I'm looking at you Xamarin folks who said to post my questions in SO)?
EDIT:
Here is the guide for updating an app (doesn't appear to apply to the issue I'm seeing): Xamarin Update to iOS11.
Here's a specific example of code that has suddenly stopped working despite no code changes:
UIFont customFont = UIFont.FromName("streamline-24px", (float)this.IconButton.IconSize);
The .tff file is the same, but FromName() yields a null value now.
I figured it out, hopefully this helps anyone with the same configuration that upgrades their Xamarin.Forms or Xamarin.iOS project from Xamarin.iOS release 10 to 11. I was lucky to happen upon it after reading Kevin Mullins answer at Xamarin saying that you should:
Ensure that all of you icon files are in place (either via the info.pst file or an Image asset).
My Info.plist > Visual Assets looked like this (which worked prior to the update)
Selecting Use Asset Catalog and selecting a value resolved the issue.

After updating Xamarin and Xcode, failing to run app on iOS device

I recently updated Xcode and Xamarin and when I deploy my project to my simulator on iOS it works well. But when I however try to use my phone that has been working succesfully for many months now it does not work and I get this error in the log:
System.IO.FileNotFoundException: /Users/Carlos/Projects/Myproject/iOS/obj/iPhone/Debug/build-iphone8.1-9.3.2/ibtool-link/LaunchScreen.storyboardc/02J-Ip-oVM-view-Ze4-5b-2t2.nib does not exist
My bundle identifier matches my provisioning profile that I have made on apple.
I have tried to delete the obj and bin folders in the projectmap/mainmap (not the obj and bin-folders inside the iOS folder) but without any success. I have also rebuild the project and cleaned it but the problem still remains.
When I create a brand new project however it works. So it seems to be a problem with old projects only.
In the map on my old project I cannot even find "ibtool-link" and if I check the newly made project I just made i can see it there and other maps as well. Can I solve it by copying them over? Or is there a better solution?
Any ideas what it might be?
You might try the suggestions (I saw at least 2 different ones) in this post which are:
simply right click on the xib and open it in IB. I then turn around and close it in IB and that gets me past the error.
And
make sure 'Main Interface' empty in info.plist.
Remove Bin and Obj folder.
Also you might try deleting the build cache on your mac by going to /Users/<Your User Account Name>/Library/Caches/Xamarin/mtbs/ and then delete the folder that is the same name as your solution (there might be 2, one with iOS in the name, delete both). This will get recreated when you rebuild your solution.

Images files still appearing in app even after deleting every supporting files Xcode 6.4

I deleted all my supporting files form Xcode's project and still when I run the app some how some images are still there/appearing but when i search in the search box for the file at the bottom left of the project. It says that there no file of that name in my project does anyone know why or how this is happening? And theres nothing in assets I'm using Swift if it helps Thanks
Old things that you delete from the project are not deleted from the built app, or from the intermediates along the way. To do that, you need to clean all the caches, and also clean out any old built versions (e.g. clean the simulator, and also delete from the device if you've been testing on a device).

Resources