"Resource.Id" does not contain a definition "Home" - xamarin

I am having a bit of trouble getting Home in Android.Resource.Id to be recognized. If I do global::Android.Resource.Id.Home, it works, but I want to try to avoid using global::. I cleaned the project and rebuilt, many times. I also tried removing the Resource.Designer.cs file, but it was not regenerated because of all the missing references to the file. Can anyone help with this issue?

The problem is that you have Android in your namespace, which is why it only works when you use global:: infront.

Related

Could not find a part of the path 'AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.class'

while building xamarin forms android app in debug mode
I am getting following error
Unable to remove directory "obj\Debug\90\android\bin\classes". Could not find a part of the path 'AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.class'.
unable to find resolution for this as line number is not shown
Your path to the solution could be too long. I solved this by moving my solution closer to the C drive root. Also take into account that your application might not have sufficient rights to access that location, so make sure you give the necessary access rights.
Manually delete your bin/obj folders from your Solution, and then try to rebuild.
Usually this does the trick, since it is trying to remove a class that he cannot find a path of.
Manually deleting the obj\Debug\90 folder and subsequent build worked for me.
Clean and Rebuild didn't do it for me.
You need to make sure that the path is short and you dont have any spaces or special characters in the path to your project
The latter one was the issue that haunted me for a while.
For example: C:/abc xyz/ProjectName/... is unacceptable because there is a space between abc and xyz.
I don't exactly know why but this works for me
Happy coding!

CoreData NSManagedSubClass files generating duplicate files?

I recently had to move my project to a different folder, and now when I run for some reason when I create the NSManagedSubclasses it seems to be making two copies. One in the correct location I tell it to save and another in Library->Developer->Xcode->DerivedData->WorkOrders-eamzgsjrwlhqoohhbyqilrvnbskh->Build->Intermediates->Workorders.build->Debug-iphoneos->WorkOrders.build->DerivedData->CoreDataGenereated->Workorders-> (NSSubclassed files here)
My problem is it won't compile now with the error below.
<unknown>:0: error: filename "Uploads+CoreDataClass.swift" used twice: '/Users/josephastrahan/Documents/Distribution.Tech/Work_Orders_iPhone/WorkOrders/Uploads+CoreDataClass.swift' and '/Users/josephastrahan/Library/Developer/Xcode/DerivedData/WorkOrders-eamzgsjrwlhqoohhbyqilrvnbskh/Build/Intermediates/WorkOrders.build/Debug-iphoneos/WorkOrders.build/DerivedSources/CoreDataGenerated/WorkOrders/Uploads+CoreDataClass.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name
<unknown>:0: error: filename "Uploads+CoreDataProperties.swift" used twice: '/Users/josephastrahan/Documents/Distribution.Tech/Work_Orders_iPhone/WorkOrders/Uploads+CoreDataProperties.swift' and '/Users/josephastrahan/Library/Developer/Xcode/DerivedData/WorkOrders-eamzgsjrwlhqoohhbyqilrvnbskh/Build/Intermediates/WorkOrders.build/Debug-iphoneos/WorkOrders.build/DerivedSources/CoreDataGenerated/WorkOrders/Uploads+CoreDataProperties.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
For some reason it thinks the same file is being declared twice, very bizarre and not sure how to fix this. I looked at other answers here (How to resolve error showing like filename used twice), but none of the answers solved my issue.
Note:: Also, If I delete the files they just come right back in the derivedData location you see in the attached image upon recompilation.
Even stranger, I was doing some tests, and I created only the workorder object but not the upload object and it compiles fine! I look in my build phases and don't see upload anywhere even though workorder has a relationship to it in code! It must be accessing the file from that derivedLocation for some reason.
Any help why is appreciated.
I think I found the solution but not sure why, so anyone that can elaborate would be appreciative.
I was reading a post here (XCode 8 generates broken NSManagedObject subclasses for iOS 10), and after reading the answer by Ryan H. I figured to give it a try.
By setting the codegen option to manual and setting the global space to my current project (see attached image), I deleted the files in the derived location and now they don't reappear and I don't get the duplicate error and everything compiles. I'm not sure how the codegen option even changed in the firstplace but something to watch out for sure.

Could not copy the file "..\HiQPdf.dep" because it was not found

I get this build error after trying to use HTML to PDF Converter Library for .NET. I copy over the dll, dep and xml files from the ZIPped folder downloaded from the website but when I compile my code, the HiQPdf.dep disappears.
The FAQs from the website say to change the execute permissions of the HiQPdf.dep file but after i do this, it still doesn't work.
How can i get rid of this error?
I resolved this by changing the execute permissions on the HiQPdf.dep file and then changing it to read-only. I don't see how this is a stable or logical fix but it is working now.
I solved this issue by just removing & re-adding the dll.

CodeKit: #codekit-prepend not working

I am trying to combine Javascript files via CodeKit using the in-file statement #codekit-prepend. Even though all the paths are correct and all the files exist CodeKit does not resolve the in-file statements. Is there anything missing?
ok so...it was me being stupid. it all worked well, i just looked in the wrong place. the combined file was inside the folder /min.

Flex error, unable to load SWC

Need help in a very weird error in Flashbuilder where a SWC seems to magically appear and is giving me errors. All the updates to the SWC is not being recognised by Flashbuilder.
In my Libs folder, there is no ._controls.swc file in it but in the build path in Flashbuilder, it just magically appears and is giving me errors, which i suspect is what causing my original controls.swc to not be able to update its library of movieCLips in it.
Any idea what could have cause this?
I just manage to get it working by removing the libs folder from my source and not from the flashbuilder. then creating a new folder and copy over the swc files into the new folder. then it works. so i guess there must have been some weird hidden file in the folder..
thanks for all the suggestions.
Try to Clean your project go to Project>Clean, I think this may work for you!!

Resources