So I just downloaded the newest eclipse version and I noticed I don't have autocomplete. I went to the preferences and enabled them. I restarted eclipse and when I got back - still no autocomplete. I went to the preferences again and the checkboxes I checked were unchecked now. I tried doing it again without restarting - the moment I do something like
Button btn = new Button();
btn.
and I press control + space I get No default proposals. When I go to check the settings again the checkboxes get unchecked again(by themselves). I added the source code from the jdk too. Still no success. I tried to download it again a few times. Each time to no success. I tried placing the eclipse folder in tons of different places - first it was in the program files folder (I run on windows 10 64), then I moved it to a non system drive it still didn't save. I tried creating a ton of new workspaces all at different places on my harddrive and still nothing worked. I tried looking for people with the same problem as mine but most say they fixed the problem by updating - I can't update because I just downloaded the newest Eclipse version. Anyone has any idea how to fix this?
Well sorry if you just found this on Google because my solution is just as dumb as most of the solutions out there. After the 2nd reinstall I decided to try again tomorrow as it was getting late. Next morning everything worked. I didn't even turn off my PC so not a restart fix.
Related
I've been having issues with a Java project that I've been working on for a while.
Starting about 1 or 2 weeks ago, whenever I use Netbeans (8.0.2) to generate a new file in the project (right click on package > new file), the wizard will hang for up to 10 minutes before releasing control back to me. The file is created after about 5 minutes. This doesn't happen with any other project, only this one; but I can't find anything different in my project's configuration compared to projects that work.
I created a bug report about this on the Netbeans bug tracker, but it hasn't been looked at in over a week. It has a copy of the Netbeans output log, and a profiling snapshot of the class generation.
I've tried reinstalling Netbeans (remaining at 8.0.2), which didn't help, and I don't really know what else I can do to locate the problem. If anyone has experienced anything like this, or has any advice on how I can track down the issue, it would be greatly appreciated.
Here is a link to my project on Dropbox. Feel free to download a copy, compile it, run it, etc.
I am using Windows 7 64-bit, and I am using the official Netbeans 8.0.2 from netbeans.org, launched straight from the desktop (I am not using any particular command line arguments or enviroment variables, as far as I know)
It turned out that the issue was that my Mercurial client was hanging when it made status calls, and Netbeans, due to a bug, was stuck waiting for it forever.
The issue with Mercurial can be worked around by deleting the Mercurial log file, and the bug with Netbeans was eventually fixed.
I often randomly receive "R can not be resolved variable" errors, and when it happens I can never fix them unless I create a new project and copy and paste all the code. I think this shows that these are not errors from my code. I have cleaned the projects, restarted eclipse, my computer, and even reinstalled Eclipse, but none of those work.
I Have noticed that the gen file (Generated auto file) does not contain any file. I have not deleted them my self and this has frequently happened before.
I know that many people has posted questions on this topics but they have never worked for me and they usually receive low rating so not many people comments on them either. Also if it requires cmd or terminal, please give the commands for Windows, Linux/Mac. I use Mac. I have recently installed GooglePlayService in the SDK although it worked after I installed it.
I am very sorry for lack of useful information, as I have no idea what the issue is.
Here are some of my screen shots to show MainActivity.java, Package explorer and res.values.strings.xml.
I apologize for describing the situation in a confusing way but I tried my best, please tell me what you find confusing if you do find this confusing.
Aftr all Thank You Very Much!!!
Your "gen" folder is empty. It should contain R.java
[1]
Try this:
-Right click your project
-Select properties
-Select Java Build Path
-Click add Folder
-Select the gen folder
-Click OK
[2]
if [1] doesn't work
Check your Res folder for any errors in your XML files, if one of the files has errors, then the R file will not be built
This error was caused by a bug on the Eclipse where even, if you click on re-build it does not regenerate the resource file.
To fix this, even if your eclipse claim that it is the latest version, you should go on the homepage and manually reinstall the latest eclipse with ADK or just install the android studio
Today I came to work, happy. But when I opened my Eclipse, I saw that one of my projects has errors.It's weird because it shows that it has errors only in the window bar, and not in the Navigator. I don't have any Java errors, this is a valid project that was fine all the time:
Some of the errors on the error log of Eclipse:
JavaBuilder handling ImageBuilderInternalException while building: SP_Procedure
Cannot connect to VM
File <SomeFile> has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Internal error
When I run an application from this project, I get a warning message but when I proceed, it works fine, but still. It's very disturbing and I'm not sure if it's harmless.
I tried to:
Restart Eclipse
Restart my machine
Clean projects and recompiling them.
Refresh projects
Pray
Nothing helped. What could be the problem? (I'm using Indigo Service Release 2)
The following nuclear option has desperation written all over it. But I have been where the OP has been with the Juno version of Eclipse.
Run a "Synchronize with Repository" and save all of your local updates to a different directory.
Delete the project. (Check the box to delete the contents on disk. Scary step, but that's OK, because you saved it in a different directory in the previous step, right?)
Read in a fresh project from the repository. It builds happily at this point.
Integrate your local updates.
Keep on praying.
Looks that one unused JAR was deleted, but for some reason, I didn't get errors in any file, even in the files that imports this JAR! So what I did was restoring this JAR, delete unused imports and deleted the JAR again.
I've found this error after two days of navigating on this project on each file.. This is weird that Eclipse didn't recognize that1 this is an error, and throw many unrelated errors such as:
Cannot connect to VM
File has been skipped, problem while reading ('Resource is out of sync with the file system')
Unhandled event loop exception
Is this a bug in Eclipse? (All errors and warnings are enabled!)
1 As seen in the image in the question..
A class from the list of imports for the file seems to have moved out or the jar file containing the class is missing.
Expand the imports section and check if you find some classes that are missing but have been imported.
Though it is a pain, sometimes the easiest solution is to back up all your projects (either in a repository or somewhere else on your computer) then uninstall and reinstall eclipse. No it's not fun, but it should reset eclipse so everything works again. The downfall though is that you have to reconfigure eclipse to any special settings you had/reinatall any extra functionality currently installed (eg. android add-on) and reconnect to any repositories you have. While punting isn't fun, it can be effective... I hope you don't have to resort to this though.
I have went through that problem a lot of times, and tried everything you tried. Rebuild, recompile, refresh, remove and add JDK, remove and reinstall Eclipse... nothing worked
The only thing I concluded is that the workspace metadata was corrupted.
What I did (every time it happened) was
Create an empty workspace
Import -> existing projects into worskpace
Mark the "copy projects" (else it will only link them)
Wait for the copy, and start working with the new workspace
If you work with SCM systems (Git, SVN, etc), making a full checkout will do the trick too, but the worskpace import will let you retrieve those changes you didn't get to commit (if any).
It's a little painful if you have somethings already set (like JDK names, servers, etc), but then I realized it was faster than keep searching how to fix the workspace
Regards!
PS : I've been working with Kepler lately, and everything works fine till now
Click Window -> Show View -> Other -> General -> Problems
This view will show you what is wrong.
Did you, by any chance, update your virtual machine outside of Eclipse? I can't help but feel that we're both missing a finer detail here. I just keep seeing "cannot connect to VM" and thinking that it's a major clue.
Have you tried running anything from the terminal? Does it work there?
If so, do you know where your current edition of Java is located? Is Eclipse looking somewhere else?
Is this exclusive to one project? Do you use any additional libraries to the JDK?
Maybe try this for Resource is out of sync with the file system error:
Right click project in Eclipse Package Explorer
Close Project.
Right click project in Eclipse Package Explorer
Open Project.
Other things not mentioned:
project properties > java build path, see if any of those tabs got changed, local file got moved? read/write permissions on some file you are linking to?
project properties > java compiler, see if workplace settings have changed? maybe under errors/warnings, you can systematically set them to 'ignore' until the error goes away to determine what type of error it is?
maybe update some of the eclipse plugins?
I saw something like this happening for a number of reasons. Mainly because of validation in files other Java source code. See if you are validating XML for instance.
Right click your project and chose Properties (Alt+Enter) and Validation to see the related configuration.
As for the danger, I lived with those marks for ages and nothing wrong ever happened.
So I was busy writing away in eclipse when there was a power cut. Luckily I had been saving regularly and so when I got back on I still had all my work.
However after writing a few lines and running it and spending a while trying to figure out why it wasn't working I realized that whatever I wrote didn't change what ran. I could even comment out bits of code OR EVEN the entire program OR EVEN YET DELETE LINES OF CODE, yet it still runs as if the same code was there from before the power cut. In the file menu all the save features are grayed out, yet if I control S and restart my pc or restart eclipse then it has made changes to the code and saved however the new code has made no effect on anything and still runs as before.
Has anyone else experienced this?
Has eclipse got some auto save feature for problems such as power cuts in order to prevent work less?
Has this put eclipse in a special mode that I can exit back to the normal mode?
When issues like this happen, the first thing to do is to click on Project -> Clean in the main menu.
The Project was corrupt.
Solution
Copying classes across into a new project and deleting old project.
Try restarting eclipse. Perhaps it kept some content in the editor but the link was broken from the actual file that it's building. Maybe copy your code just in case the file is out of sync with the editor.
My problem was the folder was in a different workspace, so the old version of my file was in there, but my newer saved version was in a different workspace. I didn't realize the newer version was somewhere else. This happened because I need to send files back and forth from my main computer to my laptop for school, then return the folder again. So be extra aware of your workspace locations! If you export a project from Eclipse, it will always choose one by default, but you can choose another in the export menu.
I have a problem that seems to come up both with autocomplete and quick fix. Sometimes when I use cmd+1 for quick fix dialog, Eclipse freezes and however long I wait (30 min at least), nothing happens. When inspected in activity monitor, it seems to exhibit little to no processor activity.
I have a Mac with OSX 10.6, and Helios with no weird plugins. I program in java, so I use very standard features.
Is this a known bug? I have tried to google a lot to find useful info. I am not very good at reading bug reports though, and the concept of feature freeze kind of taints my search results.
Thanks for any help.
As for Eclipse you can not know what is happening. The whole platform is a set of plugins, and the requirements (for example responsiveness) are not strict for them. So a third party or even a bundled plugin can cause such a failure. So most of times you cannot have a clue about what is wrong. Some stuff you can do:
while hanging unplug your network connection. If you are behind a proxy for example, a plugin can wait for a long time on network io
you can check with for example resource monitor, which file eclipse opened. Some of the opened file handlers can have relation with the problem
edit .classpath file in project where code completion freezes, and it will "reset" your project stuff in eclipse
you can browse .metadata folder in eclipse workspace and you can guess which folder to remove temporaly. After removing, try if error is still present
create a new workspace and import projects into it
if new workspace do not work, then the eror is in configuration folder in eclipse root, and you can play the same thing like in step 4
use a brand new eclipse
+1. Maybe some new plugin is responsible. In eclipse Help/about/installation details/Installation history tab you can revert to some older set of plugins.
Hope it will help.
Seems that you encounter known and already fixed bug.
Issue fixed after deleting all the files in the below directory
configuration\org.eclipse.osgi\.manager
.fileTableLock
.fileTable.1
.fileTable.2
There will be fileTable lock files, delete all those files