How do I fix this unity compile error with the custom main gradle template? - c#

Through re-installing the SDK and the google play services API, I was able to get 3/4 errors solved. but this one is an error I can't solve. here's the error:
Error with the Custom Main Gradle Template Enabled
basically, whenever I do what it suggests and disable the custom main gradle template, on the build after I disable it it pops up another error saying that I need to turn it on. I've been stuck in a loop trying to solve this error, and I have no idea how to fix it.
Also, for reference, here is the Image of what the error looks like when I have the main gradle template disabled
Errow with the Custom Main Gradle Template Disabled

Related

Hot to fix 'VerifyVersionsTask' error at compile Xamarin.Forms project

After creating a project from scratch using Xamarin.Form and after updating all the libraries (nuget packages)
When compiling gives the following error:
Unexpected task error "VerifyVersionsTask"
Create new blank Xamarin project
Update to the latest nuget packages (all them)
Try to build the project but it failes with the following error:
Error The “VerifyVersionsTask” task failed unexpectedly.”
“System.TypeInitializationException: The type initializer for ‘Xamarin.Android.Support.BuildTasks.NugetPackages’ threw an exception.
—> System.ArgumentException: An item with the same key has already
been added.
Build should run without error.
Please see this tweet
Sorry folks we have delisted 28.0.0.2 for the time being. Please revert back to 28.0.0.1 until we can resolve and release an update
You probably installed the Xamarin.Android.Support.* libraries with version 28.0.0.2 which is flawed and retracted. Revert to 28.0.0.1 for now.
Also see the related issue on GitHub for this error message and the progress.

Xamarin.Forms iOS crash on XAML pages with custom controls

I am working on a Xamarin.Forms project, for which I recently upgraded the shared projects from PCL to .NETStandard.
At that point, I encountered build issues coming from several of my UI XAML files, with the error being:
Failed to resolve assembly: ‘MyAssembly, Version 0.0.0.0,
Culture=neutral, PublicKeyToken=null’
The problem files were found to be those that referenced custom XAML controls. After finding several people with similar issues online, I eventually found that I could get past this issue by setting the XamlCompilationOptions for those pages from Compile to Skip. The project now builds for iOS and Android.
The Android version works normally, however for the iOS version crashes when one of those pages tries to load, due to the presence of the custom control, with an error such as:
Xamarin.Forms.Xaml.XamlParseException … Type shared.SharedControl not
found in xlmns clr-namespace: …
Has anyone encountered this issue, and if so, did you solve it? Is it a code issue or a Xamarin / Visual Studio Mac bug?
Ideally I would like to not have to set the XamlCompilationOptions for those pages to Skip, but either way I don't see why it should affect iOS but not Android.
Firstly, XamlCompilationOptions.Compile means Compile the XAML for the class or project when the application is built.While XamlCompilationOptions.Skip do the same thing when the application is run on the device.
In addition ,I suggest that you can do following steps:
Delete and Re-generate all share files
Remove ;assembly:xxx from App.xaml
Clean and build again.
Here is a similar thread for you referring toXamarin.Forms.Xaml.XamlParseException has been thrown
PS:There is a link about how to Upgrade PCL to .NET Standard Class Library
You need to load that assembly before using it. On Xaml it does not load, just try to reach, and crashes if its not loaded. Before using it you need to load assembly by calling a method, or creating an object belong MyAssembly.
There should be a Init method for the assembly to init things. you should call it.

Could not load the nibName issue (xamarin)

We start to prepare project with generic solution for few apps using Xamarin studio (the idea is to let all our apps use same "Core" components).
We started from preparing general "Core" with base functionality. Also we add "subCore" - libraries with functionality specific to each platform (iOS, android, windows etc).
Currently setup such structure for Android and iOS.
During second step of implementation for macOS, we faced with few blocking points.
The problem appear when we try to configure (in way described above) structure for macOS platform.
I was able to create macOS class Library with components that should be reused in apps (for now this is just 1 class with xib file). But, when I want to use this package (with xib inside) in macOS target, got exception:
External Modification Warnings: Debugger attached to process.
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[NSNib
_initWithNibNamed:bundle:options:] could not load the nibName: MainViewController in bundle (null).' terminating with uncaught
exception of type NSException abort() called
After some investigating, found that Mac Build server is not converting xibs into nibs, so this nib file is just missing in package created by Xamarin.
Additional testing info, based on proposed solutions found in Xamarin forum:
rename, recreate, reposition of xib file in project - not resolve the issue
recreate project - not resolve the issue
check Build action in property is set to InterfaceDefinition (also check all other possible variants) - not resolve the issue
I found this post, with root cause exactly as I have:
Mac Build server is not converting xibs into nibs.
According to discussion on this post, issue should be fixed, but I still faced with this.
Can some one advice how to fix described problem?
To anyone who faced same issue, please install
xamarin.ios-10.13.0.27.pkg
and
xamarin.mac-3.7.0.27.pkg
This build include fix for described problem.
For more, visit this page.

CS0012 Error when building the getting started Xamarin Android app

I am following along with the getting started tutorial:
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-xamarin-android-get-started-preview/
I can successfully work the steps up through "Publish your server project to Azure". However, when I download, open and build the Xamarin.Android app I have issues. Specifically, the output window says the build was successful, but the error window indicates that there are 14 errors, all of which are CS0012.
I understand that the "System.Runtime" assembly isn't being referenced, but no solutions I have been able to identify on MSDN or on StackExchange seem to correct the issue.
Any help would be appreciated!
I was able to solve this issue, plus a number of others (related to missing references) by adding the references using the "server" portion of the getting started demo. I also had to update all of the nugget packages as the references I added were in conflict with some of the existing references in the project.

Strange exception suddenly appears when trying to install a setup project, need help big time

Using Visual Studio 2010 to build a setup project that installs a Windows Forms application .Net 4.0 C#. It has worked fine for ages but now when I'm trying to install the finished setup file, I'm getting this error message:
Error 1001. Unable to get installed types in the "Path" assembly. -->
Unable to load one or more of the requested types. Retrieve the
LoaderExceptions property for more information.
I have been searching for answers for over 4 hours now without finding anything. This problem just came without me doing anything. Last time I build the install file was like 2 weeks ago and there was NO problem at all. I haven't deleted any reference or any code that have anything to do with the setup project.
How could this problem appear from nothing and more important, how do I fix it?
Based on the error message in your second comment, it appears that your SysDir.exe assembly has been added as a Custom Action with the InstallerClass property set to true, but either no installer classes could be found in the exe or the exe could not be loaded due to missing dependencies.
You can see the list of Custom Actions by right-clicking on the installer project, selecting View and then Custom Actions.
If your exe does not can an installer class, then you can remove it from the list of custom actions.
If it does contain an installer class, then the issue is going to be missing dependencies. If fuslogvw doesn't work for you (it has always helped resolve this kind of issue for us), you can carefully review the list of references in the exe's project and compare them to what is listed in the installer project.
The other trick that we use is to examine the install directory while the error message is displayed on the screen. We can often see that DLLs are missing by doing this, usually because the path was entered incorrectly in the DLL entry within the installer project or because a condition was set incorrectly.
Have the same error today. For me it was the project type of the class library.
I noticed that the pucture on the guide I was following had selected Class Library (.NET Framework) instead of just Class Library.
Creating the correct project type fixed the error.
https://nhvu1988.com/posts/how-to-create-msi-installer-using-vs-installer/

Categories

Resources