Mysterious compile error with groovy eclipse plugin - eclipse

So, I am developing with eclipse 4.2 and groovy 2.3 / jdk 1.6.0_35.
I just worked on one of my classes when suddenly eclipse showed me a dozen compile errors in different classes out of nowhere. It says e.g. it can't find a class in an import statement, although the class is there. Running the code works fine even though the errors are shown. If I add a comment to one of the classes and save it, some errors go away but may come back as soon as I change another (totally different) class.
It also shows me some errors like these:
error description:
As you see, the error is totally unrelated (Optional is totally independent of any other class, also of course independend of the mentioned classes in the error message). If I add a comment somewhere and save Optional, the error goes away but comes back as soon as I save any other class.
I cleaned the project, deleted the bin-directory and restarted eclipse/computer but it didnt' help. Does anyone already experienced this behaviour? How to fix it?

I got similar problem and error was in file above one with compilation error. So try to comment file before and check if this solve problem.

Related

Xcode is marking all symbols as 'undeclared type' yet they are visible and the project compiles fine

Just to get some context here is a screenshot, though you probably gathered this from the title:
Xcode is marking all symbols as undeclared, usually this would be because it doesn't exist or isn't imported, but in this case it was working fine 20 minutes ago and weirdly the project compiles and runs with no problems.
When I compile the errors go away but there is no syntax highlighting, as soon as I start to edit the file the errors all come back. I can work if I remember the exact signatures for anything that I need to use but with the lack of code completion and errors this is very hard.
Notably this is only a problem in a few source files, its not even the whole project. Nothing has changed that I am aware of that could cause this.
Before anyone suggests it, I have tried cleaning, deleting derived data/build folder, restarting Xcode etc...
My colleague is seeing the exact same issue on his machine.
So I managed to fix the offending source files, I just compared their attributes to those of a working source file and it turns out that the problem files included the tests project in their target membership and the working file did not. I'm not sure why this is causing the issue as other projects use automated testing without a problem. Nonetheless this solved it for me, at least until I start writing test cases...

org.codehaus.plexus.archiver.jar.Manifest.merge(org.codehaus.plexus.archiver.jar.Manifest)

This godforsaken error in eclipse won't die. I've tried everything mentioned here and elsewhere to get rid of it, but it won't go away and now I can't use the web service utility in eclipse because it complains about this "problem", which apparently isn't really a problem, but it is with m2e, which for the most part is useful.
First off, the error message, if you can call it that, is not very helpful. Whichever component generates that, could you produce something more meaningful?
Anyway, I've tried deleting the problems in eclipse, but they only come back. I've re-worked poms and updated the versions of the maven-ear-plugin to 2.3.2, all to no avail (and seriously, wouldn't that just be trying to skirt the real issue?). I've tried creating and updating a lifecylcle-mapping-metadata.xml file to ignore the org.codehaus.plexus -> plexus-archiver -> manifest goal. Nothing works.
What exactly is causing this message and what is the RIGHT way to diagnose the underlying cause and then solve it? Any insight would be most greatly appreciated.
This is caused by m2eclipse-mavenarchiver invoking the mavenarchiver plugin merge method by reflection. The method was removed in mavenarchiver 2.4, breaking m2eclipse-mavenarchiver.
This issue was fixed in m2eclipse-mavenarchiver 0.17.0 you can install from https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.0/N/LATEST/
(URL updated to HTTPS)

Flash Builder intellisense - Unable to detect members of class randomly

Suddenly flash builder stops identifying data members of a class. When I type obj. the intellisense window does not show any data members or methods. Yesterday I got problem with 4.6 and now with 4.0. Yesterday I imported the source files into new project to resolve this problem. I thought it is something to do with the newer version but I got this in 4.0 as well. This is really a huge problem.
I did all tries like
Reopening project
Restarting FB
Triple checking the import packages/classes
Syntax error
It is similar problem with many of people got here and I am sure it is not a problem of importing packages/classes or any syntax because It happens all the sudden randomly to random class.
Not just that but when I ctl+click on the variable (which should tame cursor to the variable declaration) IDE throws an error message "Code Navigation error: Source could not be found"
I am not pasting any code here because, as I said earlier I am sure its not related to any syntax, importing issue (in short not a coding isssue), but just some sort of FBs memeory/stack or something else.
Please let me know if any one has faced this problem and found the solution other than copying the source into a new project

Xcode "Use of undeclared identifier" errors, compiles/runs just fine

I've got an incredibly annoying issue that is hampering my workflow. In my project I have "User of undeclared identifier" errors all over. They are all in reference to a single class, specifically a Theme class. I checked for any circular referencing with my imports, none. I'm really confused.
Here is a screenshot of the errors. I would post errors in the Build Log for more detail, but there aren't any. It builds and runs just fine...
I've tried cleaning, deleting the derived data... Any ideas?
I was having the same problem and noticed that all of the undeclared identifiers were declared in files that were in my pch file.
With this in mind I deleted one of the #import lines from the pch file and recompiled which failed as expected. I then put the deleted line back in, recompiled and it compiled normally with all the false errors gone.
Hopefully this simple solution helps a few of you out if the above solutions don't.
These kinds of errors are quite common with Xcode, unfortunately. It would be great if it would auto-refresh its error list all the time, but it doesn't always. When this happens, I strongly suggest that you restart Xcode, which will flush its error cache and hopefully solve your issues.
How are you including this class? In most cases I just include the class explicitly in header and/or body - instead of the *.pch file. Then this error goes away in my case.
Also deleting the derived data workes once in a while. Did you change the location in preferences recently by any chance. I also got this error when I use a ramdisk for derived data and then go back to default. This is the most annoying case - since it causes this error to appear then in almost every file.
This error seems to happen more often in Xcode 4.4 than the prior versions.
Have you included the library files correctly? Take a look at that. Sometimes ARC issues might occur if we don't include the correct file, or something's missing or not connecting UI.
For me the issue was that I created UnityInterface.h/m file to handle the obj-c to c# interface. UnityInterface.h is already defined by Unity. I renamed my own UnityInterface to _UnityInterface and now everything works.
Just posting this for anyone who might have this problem later and doesn't find any of these solutions to work:
If you have any pragma marked #if statements that only execute if the program is in debug mode it will obviously cause anything declared inside of them to not be declared when you try to archive/export.
I had the same problem. Closing and opening XCode didn't help.
I solved it by checking errors in other targets and fixing them (I had tons of errors in my unit testing target). Also I moved header links from h files to m files. But I'm pretty sure, that the first thing was critical.
For others who experienced the same problem and tried all solution above with no result, perhaps you should try something like I did. I solved the problem simply by unplugging my iPhone USB cable from my Mac and then replugged again those cable. After that, rebuilt again and all undeclared identifier errors were gone.
I had the same error. In my case, it was on this line of code:
- (void)playerItemDidReachEnd:(NSNotification *)notification {
// some code
}
My error message said:
Use of undeclared identifier 'playerItemDidReachEnd'
I tried added this line to the .h file:
- (void)playerItemDidReachEnd:(NSNotification *)notification;
I cleaned it, I re-booted my macbook, and I was still getting the error.
Finally, I decided to try to delete the line in the .h file. I then pasted it into a text file, and then copied and pasted it back in to the .h file.
Now I cleaned and VOILA' !!! no more errors. Go figure. This happens sometimes in VBA. Somehow there seems to be unseen formatting in a line of code. So I thought it might be happening with xCode. Cutting it out, pasting into a text file, cutting out of the text file, and pasting it back in right where it was - fixed it in my case.
---- UPDATE -----
The above was posted as my answer. Apologies, apparently there's something else wrong.
After cleaning - my ERRORS were gone. Now I tried to build and run my app. THE ERRORS CAME BACK! So this time I re-created the class files after cutting out all the text, and pasting it into a text file. I did it for both my .m and .h files. But now the errors are back again after trying to run. SORRY. I don't know how to delete this text altogether cuz it is not an answer.
Tried to build and run my app. THE ERRORS CAME BACK!
There was also an error msg that I was missing a bracket ( } ). Finally I looking at the method just before this method, and sure enought it was missing the ending bracket! That was it!
Might be little late in answering.
I had this issue very recently. I fix this by updating my OS and then updating Xcode. I tried updating Xcode alone but did not happen because Xcode 9.4 requires OS High Sierra 10.13.*
Happy Updating :)
It it compile time error
Use of undeclared identifier '<class_name>'
I was run into this issue when developing own framework and app. Objective-C consumer -> Objective-C static framework
Report Navigator had a clear description
umbrella header for module '<module_name>' does not include header '<class_name>.h'
The solution was just to add #import <class_name>.h into umbrella header in a framework target
Try to click Product -> Analyze, after that to Product -> Build. This helped for me.

Eclipse Scala plug-in: "illegal cyclic inheritance"

I just updated to the latest Scala-IDE version on Eclipse, and it's highlighting loads of spurious "illegal cyclic inheritance" errors in code I know to be OK (it was before, and it still compiles and runs OK).
Any way to fix this? If not, how do I roll back to the previous version? I don't see any options to roll back or download earlier versions on the Scala IDE website.
Thanks.
edit: Never mind, it spontaneously sorted itself out after about 10 minutes sitting there showing errors. Will leave question here in case else anyone gets this.
"Project -> Clean Project" always helps me when Scala-IDE is showing weird error messages.
Sometimes errors will show in the editor, but not in the package explorer. Things still appear to compile ok when that occurs.