Currently I have eclipse indigo in my system and it is not working correctly like when i try to open market place it displays an error.I have java 7 on my system. Maven is not working as it is unable to connect. What I want to do now is completely remove this eclipse and get a fresh eclipse so that maven and all this things work fine. Removing and downloading a new copy didn't solve this problem as i have done it three times. I guess i need to remove few more files. please suggest how should i do it.
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 have recently had a problem with Eclipse. I am developing a java application. It suddenly freezes whenever I try to save a file. Indeed, it happens to some files in my project while it works fine with the others. I have checked the .log file in my workspace and there is no error message! I tried to disconnect my project from GIT, but the problem persisted. It drives me crazy. I have to restart Eclipse many times everyday.
Any solution would be greatly appreciated.
Such kind of issues should provide all related info: OS, Java, Eclipse version, list of plugins installed. Example of file saved. CPU, RAM size, memory setting for Eclipse.
Without knowing those details some recommendation would be to analyze and try to find the cause by comparing:
try on other PC,
with other Java version
other Eclipse version
the same Eclipse version without any additional plugins.
increase Eclipse memory settings
Check if it is build related by disabling automatic build.
Check if there are "Save Action" configured in Preferences.
and so on.
maybe some plugin causes that, but usually people just go with new Eclipse instance instead of comparing different plugins combinations.
See also How can you speed up Eclipse?
Eventually, it's worked. I created a new workspace and import it my project to it. Everything works well since then, like a magic! It seems the problem occurred because my workspace was too old. I have been working on the same workspace since more than 2 years.
Thanks fellows for your time to help.
I'm on Eclipse for hours now and I didn't found a solution yet for my problem even after many searches on internet: I have no more R.java file on my projects.
On just created or on my old projects, i don't have R file anymore and I tried so many solutions (uninstall, re-install Eclipse, clean my project, check all my XMLs, fix problem with android tool and so on ...)
Please someone can tell me what to do in this case?
Hey If you just updated to ADT Rev 22 :
I had the problem too. There is a new component in the Tools folder called "Android SDK Build-tools" that needs to be installed.
Step 1
Open the Android SDK Manager
Step 2
Select the newly added Build Tools and install. (If problem stays then go to Project Properties => Java Build Path => Order and Export and check Android Private Libraries, then clean and build project.
It may be necessary to repeat the process, restart the SDK Manager after the update and make sure it looks like this (all tools installed):
More info:https://groups.google.com/forum/?fromgroups=#!topic/android-developers/rCaeT3qckoE%5B1-25-false%5D
Perhaps in Project Properties -> Java Build Path -> Libraries you don't have:
Android 4.2.2 (or other version)
Android Dependencies ?
If so, then right click project - > Android tools -> fix android properties
and see if this library showed up.
Thank you all for saving me! I've spent the whole afternoon on search this error.
Finally, my project works.
By the way, I also encountered one problem which i wanna share with you:
After upgrading, even if my project has not errors anymore. During runtime, it seems it couldn't find the classes from the jars placed in \libs.
Go into Project=>properties => Java build path= > Order and Export.
Please make sure all your jars are checked.
If this problem occurs suddenly in a well working project,
the first step is to find whether the problem occurs only in the current project or in all other projects.
if all other projects in the current workspace are working then 90% problem is with XML / mainfestfile/resourse file that you edited recently.
This error is not shown as red mark we have to find out what we have done recently in these files.
try this
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
it solved my problem
Close your eclipse and after refreshing system, try to open Eclipse again. I think you are using Emulator along with the eclipse. It may be because of the low Memory problem (RAM) of your system. I used to face the same problem when I use Emulator
whenever there is any mistakes in any of the xmls the R goes missing when a build or clean happens so check for any xml errors in your project unless you fix it you cant get back your R on clean or build. fix the xml files and perform a clean you will have the R generated. Also check in File->properties->Builders and see if everything is checked
I was using Eclipse Indigo and nothing I tried worked. I ended up downloading Juno SR2, reinstalling the ADT, and now everything works again.
Reinstall everything and it'll work.. i.e. go back to Google SDK or w.e. you're using and download it.
Update it to latest in SDK Manager.
Go into Eclipse-Project-Prefs-Java build path-order/export TICK EVERYTHING.
problem: No R file get generated.
guess: Try cleaning project if it is old one. Else create new project with no R get generated and with no compile errors but this: no project.apk
In this case you have to check your SDK for the built-tools. May not be installed after updating SDK.
Thus download them if not download here, then put them under directory: SDK/built-tools folder. Lastly, and most important, is to Run the SDK As Administrator. This guarantees refreshing SDK with all packages appearing in it.
Install the SDK-Built-Tools or any missing packages according to the above link and you're done.
hope this helps.
Try one thing, create a new Android Project and transfer all those files which are in the previous project. That worked for me.
In my case there is error due to "&" inside strings.xml file(but error not shown) for declaring string for a array type. Now the problem has been solved as I changed "&" to "and".
So, please make sure that you do not have such silly use of symbols, and clean the project.
I have had the same kind of problem, however Rechecking all XML files in the Resources folder was helpful in my case. I found syntax error in my XML files. Cleaning and building the project again can be helpful sometimes too.
I had the dreaded not more R.java.
Some of the things I've used in the past:
Clean / rebuild (the first thing we all try)
Restart eclipse (optionally reboot pc/mac)
Update both SDK/ADT eclipse plugin to latest version
Create new eclipse workspace and import project
Enable Verbose AAPT build output Eclipse menu>Preferences>Android>Build
Port project to Android Studio / Gradle (this helped my actually see the AAPT error i was getting Error Code:138)
Delete recent XML changes - Ultimately I found deleting recent menu.xml files I'd added and commenting out where they were referenced fixed the issue and I finally got R.java.
I got the error recently and had found no fault in any layout or value file. After a lot of tries I add another Activity and the R.java was build and the error disappeared. I don't know why this occur, but it takes me hours.
Eclipse is giving me a few problems.
After a cold start and the loading of android libs, Eclipse underline the import statements or says that java.lang.Object couldn't be found.
Closing it and reopening often fix the problem. If it doesn't, another close-open fix it definitely. But it shows at each cold-start.
It also gives
"The type java.lang.Enum cannot be resolved. It is indirectly referenced from required .class files"
"The project cannot be build until build path errors are resolved"
But if i restart the build path errors and the enum problem are not show any more(sometimes the enum proble got fixed some time after eclipse's loading finished)
"Project 'xxx' is missing required source folder: 'gen' "
that should be generated automatically generated while building, and still restarting will fix them
In addition, in many projects, while building or cleaning, eclipse says that it couldn't delete the bin/. directory. I noticed that that directory is read-only, and if i try to remove the attribute(even from dos), it immediately return to read-only.
This problems aren't show-stoppers, i still can code and i still can get my apps exported, but it is quite annoying to have to restart eclipse a few times before being able to use it(and eclipse isn't that fast at opening), and i would really know how to fix it.
I searched in the net a bit, but i dind't found nothing useful or that worked.
Is there a way to fix them?
I didn't "unistalled"(it is just stored in a directory) Eclipse, since i should then reinstall android sdk, mercurial plugin, and re download and set up a few libraries i use in quite all my project, and i really hope there is another way.
final notes:
everything works when this problems doesn't show: the app works, logcat too, the right device is used to install the app, so i think java and android sdks are installed just right
I had that problem before so I just saved my projects to a different file and uninstalled everything ( java, android sdk, eclipse ). When I reinstalled it all I put the android sdk on the root of my c drive as I have a windows machine and then instead of picking where java was installed I let it do its own thing. I dont use a mercurial plug in but your "read only" problem could be related to that. Its possible your downloading files that are "read only" and there for you have no way to alter them. Im guessing since you said youve been programing you already know how to set the build paths and stuff. It might just be where everything is installed or something silly like privilege settings on your machine.
What were you using the mercurial plug in for anyway? just curious :)
Have you included the java lib in your project or? For a couple of weeks ago I sat with an project where i absolutly needed some of the methods, so because android just have some of the java lib I imported the need libs and used that.