"layout renderer failed" error in xamarin - c#

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 :>

Related

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.

Cannot compile Release build of UWP - Visual Studio 2017

I have finished a small Windows 10 app in C# and XAML and now I want to do a "Release" build of the app so that I can create app package.
The problem is: VS 2017 cannot create a release build of the app.
Please see the error message which VS give out after trying to release-build for around 20 mins.
I'm using Syncfusion PDF Viewer control in the app & hence have added reference to "Syncfusion Controls for UWP XAML".
I have tried un-checking the "Compile with .NET Native tool chain" in properties page. It works and I can do a release-build, BUT the Windows App Cert Kit "fails" my app.
Another information which I would like to add is: even if I do a File -> New UWP Project and try to do a release build of that - it still does not work.
I've also read the issue here, but it's does not seem relevant to my project. e.g., I am not referencing a winmd type.
What could be wrong?
Using the hammer approach, I deleted both the "obj" and "bin" folders (because the size didn't look right and anyways this is a demo project and I have backup)
After deleting, I set to release and build - and it worked!
Good thing, but it took 40 mins. Then after the first release-build, I changed some xaml and added some code (added button which show "Hello" dialog) and tried to build again. It failed.
Then I deleted bin and obj folders and then it worked again. But combined size of both folders is now 3.92 GB.
So everytime I need to do a release-build, I have to delete bin & obj folders and wait for appx 35~45 mins.
I will now repair VS 2017 as #Marian suggested and will let you know what happens.
I do not know if this is an answer or it's rather a work-around.
We are unable to reproduce the mentioned compilation error issue while running the sample in Visual Studio 2017 with Release mode. We have attached the sample for your reference. Please find the sample from below link.
http://www.syncfusion.com/downloads/support/directtrac/189981/ze/Sample687065144.zip
Kindly provide us the following details to reproduce the issue at our end:
• Simple sample along with the input document.
• Operation System:
• .Net Framework:
• Syncfusion Essential Studio Version:
• RAM:
• System Culture Information:
The above details will be helpful for us to assist you better on this.
Regards,
Priyanga.E
The reason for this is "Syncfusion controls". Details about this here
You need to remove the extension ""Syncfusion Controls for UWP Xaml" and add path to syncfusion libraries(which you use) .

What is the proper way of installing Xamarin because I am getting an error every time that I try to start

I am trying to develop my first Android/iOS app using Xamarin, however every time that I try to create a new project and open up the Main.axml in the Resources -> Layout folders, I get an error stating that "Something went wrong"
Something Went Wrong
I have tried re-installing Visual Studio as well as Xamarin but I have had no luck. Any help is greatly appreciated!
Install the Android SDK. You can get it from here
If you have already installed the Android SDK, you might need to (Inside Visual Studio) go to Tools -> Options, in the left side on that new window that opens Expand Xamarin. Click on Android Settings and Make sure all the Locations are set for Java Development, Android SDK, and NDK Location. Point your Android SDK location to where you installed it.

Unable to activate windows store app the app didn't start

First of all I would like to say that I already tried all the solutions I could find on the internet, including Unable to Activate Windows Store App
I recently upgraded my Windows 7 machine to Windows 8.1 to be capable of developing Windows Store apps using Visual Studio 2013. When I open a blank project (Windows Store -> Blank App) and run it I get this error:
Unable to activate Windows Store app 'Package Name'. The App1.exe
process started, but the activation request failed with error 'The app
didn't start'.
See help for advice on troubleshooting the issue.
I already tried:
Reinstalling Windows (Clean install)
Reinstalling Visual Studio 2013
Installing Visual Studio 2012 (same error)
Deleting "bin" and "obj" folder
Cleaning the solution
Uninstalling the app from start menu
Creating a new project
Acquiring the license multiple times (the license is valid)
Making sure that app.config doesn't exist
Investigating the Windows Event Log which says
Activation of the app 'Package Name' for the Windows.Launch contract failed with error: The app didn't start..
but found nothing useful
Adding a new Windows user
Run everything as administrator
and at last, changing the desktop background :)
None of this did bring a solution. Does anyone have an idea what else could be the reason for this error?
Thank you.
I found a solution. The problem was that the drive I was working on was encrypted (TrueCrypt). Moving the output folder to an unencrypted drive solved the problem.
If switching from x86 to x64, make sure your Project Properties Platform Target and Configuration Platform are BOTH set to X64.Hint you need to change to x64 debugging in the Build menu/Configuration Manager dialog to get the Configuration Platform in Project Properties to update.
This caused the activation error problem to be resolved for me
HTH
Robert
I had the same Error and tried after loading the SQLite Package for WP 8.1 some things above:
not working:
Clean and Rebuild
Restart Computer/Phone
what did the deal (for me)
I put Platform Target under Properties -> Build to ARM instead of x86
Hopefully this might help somebody else facing this ridiculously informative Errormessage.
I had the same problem with Visual Studio Community 2015 while trying to debug an Blank App (Universal Windows) using Visual C#.
Visual Studio was installed on Disk C:(SSD), and Project files were placed on D:(HDD). I´ve created a Folder on C: Drive and placed my test project there.
After that Error messages gone.
If you are receiving this error and are developing for Microsoft Hololens:
You are trying to build to a device that is asleep. To wake your device, tap on the button on the back (on/off button).
Good luck!
I've tried all the solutions found on the net and none applied to my case, not even this one.
The only way I could make it work was changing the Package Name in the appxmanifest.
This made me think there must be some leftovers somewhere around with the old package name, that are either corrupted or inaccessible because of some permissions issues.
It might be just a coincidence but the problem appeared twice after I tried using the app verifier (appverif.exe)
Now I reassociated my app to a store app package and things seem to continue working...
In my solution, I have a non-UWP project (Multiplatform development) that builds with a different Solution Platform.
I was attempting to run the UWP project in Debug, but as the wrong Solution Platform.
Edit:
I also get this when I build my project for Any-CPU, instead of x64.
Ensure that ALL APPLICATION PACKAGES has "read" permissions on C:\Windows.
My organization's group policy likes to strip all permissions from C:\Windows, including the ALL APPLICATION PACKAGES group . By adding it back in and setting Read & execute, List folder contents, and Read, I'm able to run the app from Visual Studio without any problems.
See What to do if your Windows 8 Modern App fails to start for more tips, including this one.
I had the same problem in Visual Studio 2015 Update 3, Windows 10 Build 10586.494.
The error came up when trying to start any UWP app that I compiled without .NET Native Toolchain. With Native Toolchain enabled, the apps would start.
Installing a new (blank) app manually fixed the error for me:
Start VS 2015
File > New > Project.
Blank App (Universal Windows) Visual C#. OK.
Make sure to be in Debug config
Right click on Project > Store > Create App Packages
No. Next.
Select Debug for all architectures.
Create
When packaging is finished, open Explorer to the project path / AppPackages / [...]_Debug_Test
Right-click on Add-AppDevPackage.ps1 > Run with PowerShell
Follow the instructions
Start the installed app from Start Menu
I had the same problem a couple of weeks ago. A simple restart helped me out.
Also tried this one?: http://irisclasson.com/2012/11/04/problem-unable-to-activate-windows-store-app-the-app1-exe-process-started-but-the-activation-request-failed-with-error-the-app-didnt-start/
Hope its usefull to you
I managed to fix the same problem by rebuilding the solution. (In Vis Studio 2012)
I have tried many solutions and nothing worked. At the end what worked for me was to change the startup project to windows phone 8.1 and after it runs OK I changed it back to windows 8.1 and it runs OK. It works for me as I am making a universal app. Hope it helps anyone else.
I had the same issue with a Windows Store App after moving some files around. I ended up opening an older file (as Admin) to see if it would run and found that it did. I then returned to the file that would not and it ran also. I believe opening the older file (as Admin) reset the paths for development and the permissions. Hope this helps.
Same problem - moved my project from the TrueCrypt Partition and all was fine.
I had a similar issue, solved by choosing a new publisher certificate. And of course restarting Windows
I had same issue. Selecting proper Platform solved my problem. i.e. My application was selected to run under x86 platform, while my OS & SDK supports x64. Selecting x64 solved my problem.
I had the same problem on a UWP app when creating a package for Testing, but not when runing directly from Visual Studio 2017.
The solution was to select only the architecture that I am using to Debug the App, Instead of all options (x86, x64, ARM).
Here is the option choosed on Visual Studio
There are can be a couple of things that might be causing this problem.
Here are the trouble shooting steps that helped me out:
Step 1 : Check to see if running visual studio in the elevated mode (Run as an Administrator) helped solve the problem. (Sometimes, your folder permissions might get mangled due to various softwares that you might have install)
Step 2 : Delete all the bin and obj folders in your project and rebuild the projects in your solution manually.
Step 3 : Do a quick check of your System Type (x64 or x86 etc) and see if your project is targeted for the same.
Here is how to do know your system type: Win + R > cmd > systeminfo
If it says x64, then make sure to select the Solution Platforms (In visual studios top action bar) as x64 or so forth depending on your architecture.
Thats all I did to solve my problem.
I had unticked an option while trying to get debugging working prior to this error, the fix for me was to re-check the "Compile with .NET Native tool chain"
A rather niche situation and solution...
I was remote debugging a UWP app for a while successfully. After some reworking, I ran into this issue. In the main app project I had set the windows version compatibility accordingly (I am running the app on a Windows 10 IoT Enterprise 2019 device) but had forgotten to match those windows target and minimum versions for the Library Project that was in my solution.
After cleaning and re-deploying the solution (first uninstalling the app from the remote device), the problem went away.

Missing project sub type error when trying to create a new MonoGame project

Hello Im using Visual Studio 2012 and whenver I try to create a new MonoGame content project I get this error...Also if I try to start a windows Mono project or a Android mono project I dont get the same error but whenever i try to compile i get errors, i have unstillaed Mono and xamarin and tried installing and that never solved the issue the only thing left to do is uninstall Visual Studio 2012 but that can take a ton of time so if anyone here can help me it will be appreciated here is the link to the following error.
I think I have a workaround for you, although, I still don't fully understand the issue myself and I'd love someone to shed some light on it.
If you open up the project file as plain text you will see a ProjectTypeGuids like so:
<ProjectTypeGuids>{9B831FEF-F496-498F-9FE8-180DA5CB4258};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
If you Google each GUID you will find that one of them is DotNetProjectSubtype id="MonoGame" and the other is Windows (C#).
As far as I can tell you can safely delete the MonoGame one and proceed with your day. I believe it's only used at project creation time.

Categories

Resources