Error opening nib in xcode: Error updating Objective-C type information. Multiple types...registered with the same Objective-C name: AppDelegate - xamarin.ios

Just getting started with xamarin studio and iOS development... I'm trying to set up my development projects. When setting all this up, I had initially created a project called 'MyProject.iOS'. I later decided that I didn't want the 'p' in MyProject to be capitalized. I deleted the existing project (using finder), removed it from my existing solution, and created a new one named 'Myproject.iOS'.
Now, when I try to open the Myproject_iOSViewController.xib file to edit in xCode, I get the following error:
Error updating Objective-C type information. Multiple types (MyProject.iOS.AppDelegate and Myproject.iOS.AppDelegate) registered with the same Objective-C name: AppDelegate
Seems like something is stuck in xCode from my original project that had the same name w/ different casing. I looked in Finder and confirmed that all the old files are gone.
I believe I am experiencing the same issue that was reported here (not sure why this issue is marked as resolved): https://bugzilla.xamarin.com/show_bug.cgi?id=7550
The last commenter has a great repo and reports this solution that worked for him:
1. Close XS
2. Delete ~/Library/Caches/XamarinStudio-4.0 folder
3. Open XS : voilĂ  everything works again now !
My issue at this point is that I cannot find the ~/Library/Caches/XamarinStudio-4.0 to delete. I found a ~Library/Caches/ folder but it did not have a XamarinStudio-4.0 sub-folder in there. How can I resolve this?
I am using 4.0.9 (Build 12) of Xamarin studio.
Here is the full stack trace from the error message box that shows up when I double click the xib file:
System.ArgumentException: Multiple types (MyProject.iOS.AppDelegate and Myproject.iOS.AppDelegate) registered with the same Objective-C name: AppDelegate
at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update () [0x00118] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:98
at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update (Boolean force) [0x0000c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:72
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateTypes (IProgressMonitor monitor) [0x0003c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:476

I just had this problem. I used that post to solve it. At first I could not find the folder that is referenced. This is how I found it.
Go into finder on the Mac.
Under Favorites on the left of the screen, select the primary volume. For me that was labeled Macintosh HD.
Select Go/Go to Folder from the toolbar.
In the Go to the Folder screen that pops up type in ~/Library.
From there you can navigate to the proper directory and delete it.
Hope that helps. Best of luck.

Related

Asp.Net Core 2 after publishing get error "Layout cannot be found"

After publishing the application I get the error:
"InvalidOperationException: The layout view '_Layout' could not be located. The following locations were searched:
/Views/Home/_Layout.cshtml
/Views/Shared/_Layout.cshtml
Microsoft.AspNetCore.Mvc.Razor.RazorView.GetLayoutPage(ViewContext context, string executingFilePath, string layoutPath)"
The Layout is there in the Views/Shared folder and the application works with it locally, so this must be something wrong with the publishing.
Unfortunately in the published app the views appear all contained into a single dll file and I cannot do anything to solve the problem.
Could be anything in my code that makes the publisher to forget to add the _Layout.cshtml view?
I have a reference to the layout in my _ViewStart.cshtml
That should be for all pages. Without Layout my app is doomed and I do not know what to do.
Ok After many tries I found the cause of why the publishing did not include my layout page! It was so tricky that I am amazed. I hope this helps other people!
When you right-click on the layout file (or on any other file) you have the menu with the option properties. I opened the properties of the layout file and I noticed that there you have an "advanced" option: "Compilation Action". My option was set to "none" that means the file was not compiled and therefore not included in the publishing. I put it on "Content" and tried the publishing again and all went well, this time the layout file was compiled and included in the publishing.
In my case the "Copy to output directory" was set to "Do Not Copy", I changed it "Copy if newer" and then it work.

Cannot create class-file Android Studio

I'm trying to integrate Google Calendar API into my android project and I follow the tutorial here
https://developers.google.com/google-apps/calendar/quickstart/android
At step 5 create a new java class
I right click project folder src>main>java>com>example>utarapp and then new>file and entered the file name but then it has this error
What's going on ?
I'm using android studio 1.3.1
I think you are trying to create file with same name which is already present in the same package. This may be one possible reason.
It seems like you are right-clicking on the upper level in your application's directory tree.
Right click on one of the files inside the utarapp folder and then select Java class option from the menu.
For me this was happenning because of the length of the class name. In my case it was "ChallengesFragmentPagerAdapter"!
Changing it to "ChallengesPagerAdapter" solved the problem.
Create a blank Activity then remove "extends Activity" from the activity class.

VB6: Name conflicts with existing module, project, or object library

Opening a VB6 Project, I get errors like:
Errors during load. Refer to xyz.LOG
I open the log file and see these errors:
Line 42: Class Threed.SSPanel of control XYZ was not a loaded control
class.
In this case I can see the problem is due to the Sheridan 3D Controls: C:\WINDOWS\system32\THREED32.OCX
I thought the project was missing a component so, VB6 > Project > Components > tick the Sheridan 3D Controls and got this error:
---------------------- Microsoft Visual Basic ---------------------------
Name conflicts with existing module, project, or object library
--------------------------- OK Help ---------------------------
I will give you the best way to get rid of this problem. I came across many ways, but this is the most best way to deal with..
Close the project. Right click on the vb project and open with notepad (not with vb). This Project file will only consist of all the references, libraries and information about forms and modules used in the project.
Now just remove the conflicting module or component file, you have problem, by just deleting the entire line.. Save and close it
and now open the project and add component. I swear you wont get that error.
Thank you. Enjoy
The way to troubleshoot this problem is to start a new VB6 project > Project Menu Components > tick the Components that are selected in the affected project until you get the error.
---------------------- Microsoft Visual Basic ---------------------------
Name conflicts with existing module, project, or object library
--------------------------- OK Help ---------------------------
You need to narrow it down to the two OCX's that are conflicting.
In my case I narrowed it down to Sheridan 3D Controls / THREED32.OCX and Outrider Spin Control / SPIN32.ocx
To fix the problem I used RegSvr32 to unregister the OCXs - make sure you UNregister with the /u flag.
REGSVR32 "C:\WINDOWS\system32\THREED32.OCX" /u
I then copied the OCX's to the project folder and registered them again using:
REGSVR32 "C:\Dev\Project\THREED32.OCX"
Then in the project with the problem > Project Menu Components > select the item in the listbox Sheridan 3D controls / THREED32.ocx (you cant tick without getting the error or untick the conflicting one that is selected as its in use) > click Browse and reference it from the project folder rather than C:\WINDOWS\system32\
Another trick is close the project and unregister the affected ocx - make sure you UNregister it with the /u flag, eg
RegSvr32 "c:\Windows\system32\mscomctl.ocx" /u
Then open the project > Components > and you should see the "Microsoft Windows Common Controls 6.0 (SP6)" is using a OCX file in C:...\Microsoft Vi..\VB98\mscomctl.ocx" rather than c:\Windows\system32\mscomctl.ocx.
The project should then load without these errors:
Errors during load. Refer to xyz.LOG
Try unchecking the latest object library / reference from the references and check it again and then go for your desired reference (vb6 has few bugs which can be countered by a reverse process). I solved the error mentioned using this process.

Deleting splash screen gets strange error VS 2013

I had a project with a splash screen. It was giving me trouble so I removed my application framework.
I.e. I did:
-Created a module to be the sub main
-In module create new() splash screen instance and main window instance to run application
-Went to project properties and disabled application framework
This worked without a problem. So I wanted to change my splash screen image, so I replaced the background image. When I did that I got this error:
"Two output file names resolved to the same output file path \obj\debug\.ACFSplashscreen.resources"
Which was weird. So I deleted that splash screen class, and decided to start clean. I still have that error. So I went into my file system and deleted that resources file. Now I have a new error saying it's unable to open it!
How can I find out what is looking for that file and fix it? Nothing in my code calls it anymore.
So as to have an "answer to your question";
Sometimes, if you delete a resource, it requires a simple clean of your project, followed by a build. This has been explained below:
From Microsoft
delete any intermediate and output files. With only the project and
component files left, new instances of the intermediate and output
files can then be built.
Hence, allowing you to 'fix' your error.

unable to edit R.java Android using Eclipse

I am new to Android. Well the problem I am facing is that I have two layouts. One is main.xml and another that I made was relative_layout.xml.
I did not give it an #+id/ to this layout so the default id was relative_layout01.xml but when I gave this an id the old one still remain in my R.java and when I edit R.java it again generated the old version of file.
I want to delete relative_layout01.xml reference as it does not exists as I have given a name to my layout.
Attaching an image for reference.
R.java should be refreshed automatically.
Maybe you still have some references to it in your code (setContentView(R.relative...) or you still have it as an activity in AndroidManifest.xml?
Sorry for the noobish answer. Just my 2 cents..
Delete import android.R, and R.java completely, rebuild and it would be fine

Resources