Xcode complains like so about an old project:
Could someone provide a way to somehow fix this issue?
At this point I can only say that you can open your ManMenu.xib in the text editor and go looking for your ABFadingImageView class and see where the error is. It either has a null value or a null reference that is not accepted.
You can probably skip all the menu items. The xib file is loaded with it. At the beginning and end you see the code that is interesting for you. It is not a guarantee that you can fix it, but in the text editor you can change the xml code.
Related
The behaviour of the Go To Implementation function accessed from the editor context menu or by clicking Ctrl-F12 in Visual Studio has somehow changed in my installation of VS2019.
It used to be that when I used it with the cursor on a method name reference, it would jump directly to the method's implementation unless there were multiple implementations; then it would show them in the Find Symbol Results window.
But something has changed and now it always shows the Find Symbol Results window even if there is only a single implementation. Furthermore, it shows a duplicate of the single implementation or of each if there are more than one. The screenshot shows this where you can see that the same method definition is listed twice with the same Project, File, Line and Column details.
Does anyone have any idea why this might be happening? Could it be some incorrectly cached data causing this? Where might such data be cached? I have cleared my temp files, and deleted contents of folders named *cache in any C:\Users\xxxx\AppData\Local\Microsoft\VisualStudio\16.0* folders but this hasn't made a difference.
The duplication can be caused when there are more than one TargetFrameworks e.g.
<TargetFrameworks>net5.0;netstandard2.0</TargetFrameworks>
I have (for me) interesting problem, in Cocoa Project I created file "Credits.rtf" for testing custom text for this window... but I tried to change type from Credits.rtf to Credits.html and after this (even when I delete file and reference to this file too) the "About" window always showing below mentioned text and I dont know how is the way to change it, even when I replace reference and file by completely new Credits.rtf file (and XCode shows that this reference is exists and asked me if I want to replace it)
I think that solving this must be absolutely easy, I tried to find any idea but without success
Could you help with this? Thanks in advance
Maybe you are thinking that I'm absolute moron, maybe it is bug or I dont know, but I wish to solve this and knowing how to solve same issue in future :)
Thanks once again
Assuming you've definitely, absolutely, certainly replaced it with a real RTF file that opens in TextEdit without fail, then you may just need to clean and rebuild your project. With the project open, press Cmd-Shift-K. When Xcode is finished, build and run and see if it changes.
If not, you'll need to post a lot more detail. Perhaps an example project somewhere shared online.
I just hit a brick wall with xCode not wanting to parse my Info.plist file. I've replaced the file several times with older (identical) versions of the file that I had previously backed up, and I'm still getting the same error.
Here is the complete error message:
couldn't parse contents of '/Users/...Info.plist': The data couldn’t be read because it isn’t in the correct format.
I'm clueless on this one. I'm using xCode 5.0.1, Mavericks
This is one of the best way to detect on which line the error is occurring.
Just go the directory where the plist file is present then write this command on terminal->
plutil filename.plist
Another cause of this issue can be from attempting to put URLs (really just slashes etc.) in your app-Info.plist.
Get around it by simply raising the -traditional flag inside of the Info.plist Other Preprocessor Flags option in your project build settings.
I think you have used source-control tools, you can use basic text-edit tool without Xcode to open this plist, command + F to find "<<<<<" or ">>>>>", then you will probably find error string such as:
<<<<<<< .mine
>>>>>>> .r605
select the correct string, and delete the other one, error is resolve!
Looks like replacing the file with a backup, then deleting the derived data for the project in Organizer was the cure. Hope this helps someone else later on.
I personally ruined the file when git merge raised conflicts. .plist is an XML file and git conflict added <<<< and >>>> in there to tag the differences.
Find the .plist file in Finder (in one of your project's folders). Open it in a text editor, find the lines that don't look like proper XML, remove them and be sure to remove the duplicate XML line/node (due to pre and post git recorded changes).
This may also simply happen because you have moved the Info.plist file into a new folder, or removed it from a folder (basically, if its path changed).
Go to Build Settings and search for "Info.plist file". Edit the value. For instance, if you have moved your plist file from the main folder to a subfolder called Resources, you will have to do the following change:
Before:
TargetName/Info.plist
After:
TargetName/Resources/Info.plist
When building for iOS, the Info.plist may be corrupted whenever Default Orientation is set to Auto Rotation. The Info.plist file is created properly on the first build, but subsequent builds results in...
<key>UIInterfaceOrientation</key>
<string></string>
</string>
... at this point Xcode fails to build the project.
I was having the same error, and realized the issue was that I had a URL (e.g. http://example.com/something) as a value in my Info.plist, and I just switched on pre-processing for it (without the -traditional flag). Apparently Xcode will treat the // as a comment marker, and omit the rest of the line.
A work-around I found is to embrace the pre-processor, like so:
http:/${}/example.com/something, which breaks up the // by putting an empty string substation in the middle so it doesn't look like a comment to Xcode, but after pre-processing it's back to a normal URL.
This error comes whenever Xcode preprocessor is not able to parse the info.plist file.
So to find out the error in the specific line do the following steps :
Open your project.xcworkspace in Xcode
Go to the project's navigator
Inside your project click on the info file, if an error exists then it will popup the dialog with the line number where the error exists
You can see the below image of the popup dialog for reference, which is in my case was showing the error on line 35
Hope this will help you or somebody else. Thanks!
Happy Coding :-)
So I am writing an app for Windows Phone 7.
Today, I didn't know what got into me, but I naively thought that by changing the Assembly Name, the Xap File name, the deployment Title, and the regular Title I would change my application name. I keep getting a NullReferenceException and I think my program will never work again. I was really stupid in changing the names and I'm wondering if there's anyway to fix this. Thanks so much!
Apart from checking for any errors in the WMAppManifest.xml file - you also need to update the startup object in your main phone application project if you've renamed it or its namespace.
To do this, right-click on your main project in Visual Studio and select Properties. In the "Application" tab, update the "Startup object" drop down to point to your new object, in the correct namespace. You probably want to check everything else on this setttings page is correct too.
Same problem here, solution:
1. change the namespace of 'App.xaml' & 'App.xaml.cs' to the target startup object name
2. clean and rebuild the solution
4. open the property window and choose the new 'startup object'
Apologies. I am sure I should know where to look to deal with this but I do not:
The error below has appeared in my solution. I am not aware of why.
The item
"obj\Release\ScruffyDuck.AirportDesignEditor.MainForm.resources" was
specified more than once in the "Resources" parameter. Duplicate
items are not supported by the "Resources" parameter. Airport Design
Editor
Perhaps someone would be kind enough to put me out of my misery and tell me where to look.
Thanks
OK I found it. I have no idea how it happened. However it might be useful for the future. MainForm has a number of files containing different parts of the class. The main part has all the designer code and so on. Somehow a .resx file got created on one of the partial class files along with an InitializeComponent() method. Removing the extra .resx file got as far as reporting the duplicate method and removing that allowed the solution to compile again. It seems that though the file names are different (the error was in MainForm.EventHandlers) the two resx files are treated as the same even though they have different names.
I am now getting some exceptions but at least I can get the code running in the debugger again.
I think you'll have to open your .csproj file, and look for that file name. It sounds like ScruffyDuck.AirportDesignEditor.MainForm.resources is appearing more than once. Just remove the duplicate node (.csproj files are just xml).
Just remove obj directory from HD manually.
Clear solution from Visual Studio (Right click on project in SolutionExplorer and select "Clear")
Rebuild solution.
Cause could be a fault of generated resource file, due some conflicts happened in your project.
Should work.
Regards.