Xamarin Android Debugging errors - c#

I am repeating a question posed on Xamarin forums by another user as there has been no solution (http://forums.xamarin.com/discussion/37139/debug-chaos). Since the update to Xamarin at the start of April.
I'm facing very strange debugging errors using Xamarin Studio.
1) Set a breakpoint in the IDE and it stops at the breakpoint with a nullreferenceexception, even when the breakpoint is set on a curly bracket of a function.
2) Move the breakpoint by 1 line and the nullreferenceexception will occur there instead.
I have tried to enable/disable fast deploy and mono shared runtime without changes, and fully reinstalled Xamarin Android and Xamarin Studio.
Any ideas? It's very frustrating to not be able to debug.
Update: Xamarin Studio v5.8.2, Xamarin.Android v4.20.0.37, Nexus 7 (2013) running Android 5.0.2

it is a related to drawable images problem, please do try it that remove image from layout file and then run application as same configure it will be run successfully.
this type of problem i face at staring but now i have the solution to how to handle it.
setting android images and icon is perfect hierarchy which is mention below images and also update your SDK.

Related

Struggling to get started in Visual Studio and Xcode - "undefined symbol _main"

I am a beginner when it comes to coding, and I have been struggling with a very annoying problem this entire day. I hope you can help me relieve this awful headache.
My idea is to create a very simple app for my Mac, so I downloaded Visual Studio and Xcode.
I followed this tutorial from Youtube to get started, but halfway in the film I see that I am not able to get the same "outputs" as this Youtuber gets ( https://youtu.be/rj_n4W_mDN0?t=340 ). In my case it doesn't automatically provide "NSTextField*LabelInfo", but I can attach the button and label to the script and make them show when I run Visual Studio.
I am not provided this autofill either ( https://youtu.be/rj_n4W_mDN0?t=420 ) or the option of calling the "HelloPressed" function in Visual Studio.
Then I discovered that I have an error message in Xcode when I try to build it: "undefined symbol _main" (which the Youtube person doesn't have).
It also reads:
"Undefined symbols for architecture x86_64:
"_main", referenced from: implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
I deleted my code and restarted the program, but the same message popped up. I deleted both Xcode and Visual Studio, and reinstalled it, but it still came up. This time I didn't add or do anything other than opening a new projects (in Cocoa app), and still I was greeted with this annoyance.
I see that my "Main.cs" in Visual Studio is not appearing in Xcode project (all the other ones are), but I don't know if this is relevant. I have tried to add different Frameworks to Xcode (AppKit), but I still receive this message. Maybe there is something I have to do in the Build section of Visual Studio, but I don't know what.
I have absolutely no clue what to do and how to proceed. I find it so strange and annoying that the Xcode gives me an Error without me doing anything else then starting up the program. My Macbook pro is very new so that cannot be the cause, the softwares are newly updated: Xcode 11.5 and Visual Studio 8.6.5 (build 23). I am programming in C sharp
I hope you are able to advice me in what to do. I am a beginner so I would appreciate easy-to-follow assistance or instructions.
Thank you very much,
August
Sorry I can't offer a definitive answer but hopefully the following will help you find your issue. I don't usually use VS for Mac and installed it just to see if I could figure out your issues. It is not as intuitive as one may like...
Visual Studio for Mac on both Mojave & Catalina does not work appear to work as the video you found seems to show.
Double-clicking on a .storyboard file generally seems to open the file in VS's XML editor rather than in Xcode. There might be a setting to control this somewhere. To open in Xcode right-click (or control-click) the file name and select Open With… -> Xcode Interface Builder in the menu that appears.
– Once over in Xcode you may find you have two open windows, one is just the .storyboard file and the other is a dummy Xcode project containing it. Close the first of these and just edit within the Xcode project window. If you don't do this you cannot create bindings between the controls and the source. If you look at the Xcode windows in the video you found you will see that when the bindings are being made it is in the project window, but there is nothing to show how/why that window opened up at the front.
Do not try to compile the "project" in Xcode. It is not meant to be compiled and appears to just be the bare minimum scaffolding required to enable VS to use Xcode for UI editing. All the errors you got are related to this.
Searching the internet for Visual Studio for Mac and storyboard files turns up plenty of hits and these files failing to open correctly seems a common problem from a scan of the titles. Do some research and you'll probably get it to work smoothly, but it does work as is albeit a little fiddly. HTH

Xamarin for VS 2015 - Catastrophic failure

Few hours ago I updated my Xamarin version to the latest one 4.7.10
Everything was fine during the update process and it finished without any errors.
After this when I opened one of my projects which is Xamarin.Forms project and I tried to open any .xaml file I was getting this strange error:
Whatever I tried there was no success at all with this error. I was forced to downgrade Xamarin version to the previous one and everything now is OK.
Is there anybody who has faced the same error now or before and how did you managed to cope with this bug. And how it is possible released production 'better' version to have such a major bug...
I got this error too when trying to open a XAML file in Visual Studio 2015. The link Kris provided in the comments solved it for me. Right click on the XAML file and select "Open With..." followed by "Automatic Editor Selector (XML)". Note that this will open the XAML file without the designer but you can open the Xamarin.Forms Previewer window by going to View > Other Windows > Xamarin.Forms Previewer. More information about the previewer can be found here.
I am becoming more and more convinced that really Xamarin is the Catastrophic Failure here.

VisualStudio cannot run code on MonoGame

I am having issues with running code that is written in VisualStudio 2015 in MonoGame 3.5.
My two versions are compatible, from all I can see. VisualStudio has no issues running Console application codes, and also connects to Unity just fine (I can write code in VisualStudio for Unity and it runs).
I can also open up MonoGame and convert png files into xnb's to use in VisualStudio. It is only when I try to actually run the VisualStudio code and Windows tries to open MonoGame, it fails.
To better show what is happening, I created an empty project specifically by clicking "MonoGame for Windows" in VisualStudio, and called it EmptyGame. By default, running this should yield a cornflower blue screen. Instead, it shows this error message:
error message Ctrl+F5 MonoGame
I then tried to debug the completely default code (it shouldn't have any bugs as it is the default provided by VisualStudio but I did it anyway) and got this:
debugging error message VisualStudio
I have tried googling this error message and not gotten very far. Somebody had a similar error message for Duality2D (https:// forum.adamslair. net/viewtopic.php?f=4&t=732) but the answers they gave don't apply here I don't think...
I have also tried uninstalling and reinstalling both programs, making sure that I ticked VisualStudio 2015 in the MonoGame installation, and turning off my anti-virus while trying to run (Ctrl+F5) - I was desperate at this point.
Anyone got any ideas? I can't possibly be the first person to have issues trying to get VisualStudio and MonoGame to communicate, but Google has gotten me nowhere. I just found this website which had a lot of great reviews so hopefully someone here has an answer for me!
Appreciate it!
-M.

"layout renderer failed" error in xamarin

I have a sample Android project which is working well (can be built and installed on mobile phone). But whenever I double click on any file in the Layout folder in xamarin environment to see the layout in design mode, the following message appears. (my xamarin version is 4.0.13)
I see this question but no answer was provided. Any help will be greatly appreciated.
Xamarin team have identified an issue with this in 4.0.13 and are working on a fix for it at the moment
Link
Until this is in place, the only way to get the renderer working is to uninstall 4.0.13 and re-install 4.0.12
Known bug(https://bugzilla.xamarin.com/show_bug.cgi?id=18193). Solution here: http://forums.xamarin.com/discussion/14344/disconnected-from-layout-renderer-error-after-updating-android-sdk-tools-to-version-22-6
This same error message now appears for a new issue as of Jan 2015.
"layout renderer failed" error in xamarin
The issue is around Xamarin now expecting a 64 bit JDK and using a 32 bit JDK. The fix is to uninstall JDK 1.6 or 1.7 and install 1.8 64 Bit.
There is a temporary solution to this. I closed the layout tab, then removed two processes from task manager:
MonoDevelop.Projects.Formats.MSBuild.exe and mandroid.exe
and I was able to open layout again. But it doesnt fix the problem :>

I can't execute a project on Visual Studio 2012

I am doing this Robosapien Kinect project in C# ( http://www.youtube.com/watch?v=TKpO5F8LsCk ) and I zipped the code source form here https://github.com/fatihboy/Robosapien and I don't know why that when I open the KinectRopsapien project with Visual Studio 2012 and I run and debug the MainWindow.xaml.cs window, the window that should show what the Kinect is filming is not opening and there is blue bar on the bottom saying "Ready". I have Kinect for Windows SDK 1.7 installed on my computer. On the first image is a message that appears twice while the code is being debugged in which I click "Continue" (which I think is to finish debugging and I think there is no problem to continue) and the second image is what appears after the code is debugged where you can see the blue bar below saying "Ready" and when the window of what the Kinect is filming should appear, in which I have the Kinect and USB Uirt connected to my computer. So I would like to know why there is no window opening after I run the code? Thank you for your attention
img850.imageshack.us/img850/7566/13285409.png - First image img547.imageshack.us/img547/1449/31396912.png - Second image
Identical problem... XamlParseException after deploying WPF project
In this case the project was clean re-built...
However, I do think it might be deeper than that. Try: http://geekswithblogs.net/lbugnion/archive/2007/03/14/108728.aspx that at least then should give you more concrete information.
This program worked great for me in VS 2010 running .Net Framework 4.0 and debug as x86.
I can see your Debug is set as Any CPU in your screenshot. Make sure it is set as x86.

Categories

Resources