It is stuck in cleaning output folder for “Project”. It is not always the same Project. So is there some workaround ?
I tried the method of cleaning the project, but the library update happens too fast. I even assigned a custom keyboard shortcut to Clean and I still couldn't get it in there before it started.
I really didn't want to delete the .metadata folder because it is a pain in the arse to lose your workspace settings/preferences/setup.
So I tried:
Make a copy of the .metadata folder
Delete the original
Launch eclipse (it will open with a default/reset workspace), but it will open fine.
Quit eclipse
Delete the new .metadata folder
Make another copy of your original copy and rename it .metadata (basically put the original back)
Eclipse should now launch fine. In my case the Android Library Update still ran but it actually finished within a few seconds instead of hanging.
Then for me the underlying issue was one of my library projects got into a really broken state. I went into the properties for it, unchecked isLibrary in the Android tab and then refreshed the project. Afterwards I turned the library flag back on and did a clean.
I also had a build error in the library code that had to be fixed.
Any how, hopefully that helps if you find yourself in a similar position. Good luck!
So while I asked this question I found workaround for me , and possibly for others. You have to kill eclipse and on next start , do clean up on all projects before eclipse start that “Android Library Update” task and it will not stuck eclipse.
Deleting the .metadata folder works to get Eclipse back up and running, but after importing Android projects into the workspace the problem came right back for me.
In my case the underlying cause turned out to be the "Android Library Task" being stuck on trying to access the network. I'm connecting to the network via a proxy, and despite being configured in the global OS network settings and all other applications working fine, Eclipse was still unable to access the network. The only thing that worked was, after deleting the .metadata folder to get Eclipse running, manually entering the proxy configuration in "Preferences->General->Network Connections" to match that of the OS network settings.
Now the "Android Library Update" takes a second on startup instead of getting stuck.
In my case the other mentioned methods did not work for me
but "Reinstalling Eclipse and its all plugins" related to my project did.
After doing that it came to the normal state.
My env;
Eclipse Juno (under OS X Mountain Lion)
GWT
ADT
SVN
Another trick that works is to kill Eclipse, delete the ".metadata" folder from your workspace and restart Eclipse.
It'll force your workspace back to its initial state and clear up any hung conditions.
Since installing Eclipse 4.2 I have had to resolve this problem twice. The second time I knew that the only thing that worked for me was to create a new workspace and import the projects from the "broken" workspace. It is very fast and is a good opportunity to de-clutter by leaving obsolete projects behind.
Specifically,
choose File/Switch Workspace/other and put in the name of your new workspace.
Then right click in the Package explorer of the new workspace and choose Import and select Existing Android Code into Workspace.
Then browse to the root of a project that you wish to import and also select Copy projects into workspace.
Hit Finish.
You will have to do the same for any projects that this project is dependent on such as google-play-services.
Recently experienced this, caused by an Annotation Processor throwing an uncaught exception. Killed Eclipse, removed references to the offending Annotation from one project .java file, and started successfully.
In my case, within Eclipse, I had set up a C/C++ Builder to invoke build_native.sh, which is needed to build cocos2d-x. Interestingly, the Android Library Update indicated that it was invoking build_native.sh ! For me this explains why it was taking so long sometimes and seemed to be taking a LONG time to finish. I basically replaced this with an echo command. echo "do nothing" and I think this resolved the hanging issue.
This seems pretty goofy to me -- AFAIK, there's no way to configure 'Android Library Update', and I'm not sure why it's doing what it's doing, since Eclipse has a number of build options which the user can manually control.
Related
I have been studying Android on Eclipse Mars for some time and i have been facing a constant problem everyday-the changes made in a folder/file are not recognized by some other folder/file. For example, if i create a new layout in the layout folder and then use it in the setContentView, it shows me an error ("layout-name cannot be resolved or is not a field). It works if i save the project,close it, and open it again, but this takes up a lot of time if i have more than one error, so the question-is there a way to save and refresh the project (without having to close it) so that the newly made files and folders are recognized by the java files?
Thank you.
You can refresh your project in Eclipse by right clicking on the project root folder in your Project Explorer and selecting "Refresh".
You may also want to consider checking if you have "auto build project" turned on. In your top toolbar go to Project -> Build Automatically.
If build automatically is turned off you will have to manually build your project, by Right Clicking on the project in your Project Explorer and selecting "Build Project".
However, I do agree with Pankaj Nimgade that Android Studio is likely a better entry point IDE for Android development.
Real advice: Switch to Android Studio as soon as you can. There you would sometimes have another problem called "sync" though. But it's a much better IDE and you are at least in line with Google.
on Eclipse, F5 should do the trick. Or right click your project and Refresh. Or Clean all projects. If you are still stuck, simply close Eclipse and run it again.
I get a null pointer exception opening about half of the android XML files in my layout directory. There seems to be no pattern to why some files open and some files don't.
I upgraded eclipse to Juno. Re-installed all the plugins (ADT), re-installed the android SDK. I brought in my old workspace and adjusted my projects to point at the new android SDK.
Stack
java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.setLocaleCombo(ConfigurationComposite.java:1566)
at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.syncRenderState(ConfigurationComposite.java:3049)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(GraphicalEditorPart.java:1158)
at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegatePageChange(LayoutEditorDelegate.java:679)
at com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor.pageChange(CommonXmlEditor.java:359)
at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1081)
at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
I found one way to resolve this. My eclipse recently crashed (and wouldn't start again) for an unrelated reason. To get it to start again I deleted most of the files in ${workspace}/.metadata/.plugins. These files regenerate (but will wipe some of your saved plugins and settings). Resolved my startup problem and my xml editor problem.
Just close all the xml files and restart your Eclipse SDK
An additional solution that worked for me and might work for others:
Create a new workspace and import your existing projects into it. I felt a little better about trying this than I did blowing away or moving my .plugins directory in the existing workspace. After I created the new workspace and imported the project that was giving me the cryptic "Failed to create parts controls" message, it worked fine. I'm pretty sure it's something bad in the .plugins or elsewhere in the old workspace, but I'll just keep using this new one until it starts to crap out on me.
Note that this can also happen if the containing folder contains too high a resolution
Example:
layout-sw500dp (this folder works okay)
layout-sw1000dp (this folder causes "Failed to create the part's controls" error)
I finally found out...
I had the problem even after deleting and setting a new copy of eclipse. The problem was because of the wrong Java version. You should find the right Java version for your eclipse.
In my case I have a project which uses Java 8 and for that I use eclipse Luna. But my other project which I develop it vie eclipse kepler uses java 6 (The project with the problem!).
Since Kepler and Java 8 are not compatible, I got this weird behavior from kepler. As soon as I ran Kepler via Java 6, everything was back to normal.
If you wanna know how to sets different Environment Variables and sets your Windows Path without setting up the Environment variable everytime for each project, let me know, I would be happy to share how to write a batch file to do that...
When I try to run my Android project(which was working fine yesterday) I get the "Your project contains errors, please fix them before running your application" dialog. But my project has no errors. I've had this problem before, and the solution was always to Clean the project, but this time it isn't helping. The red X icon disappears from the project in the workspace, then reappears when I try to run it. Also restarted Eclipse so it rebuilds the project. Help?
Go to your .android folder and delete your debug certificate. In my computer it is in this path
E:\Users\blessan\.android
Inside that there is a file name 'debug.keystore'. Delete that,clean and try to build the project again. Sometimes this error is caused when the certificate expires.
There are a couple of reasons as to why this might happen. Give these problems / solutions a try.
Problem with your Manifest. These don't always show up, so give your Manifest a thorough check.
Suddenly missing / moved libraries or other dependencies. Right click your project, choose Properties and check the tabs under Java Build Path. When you accidentally remove / move a library file, or any other file the app is dependent on, it can cause an error like this without showing up as an actual error. However in the Build Path screen it will show with a little error sign.
Problems with your R.java. I had an issue with this before where there was a corrupt value in the R.java file. "cleaning" the project didn't fix it, but forcing Eclipse to rebuild the file due to me erasing it manually did.
Problem with a cached version of your app. This one is a real pain cause there are no pointers for it, but sometimes for some reason Eclipse decides to mess with a cached version of your app. This can cause anything from apps not working to apps showing images that have long been replaced by other ones or have been deleted entirely.
If the other fixes don't work, try navigating to your project folder and removing the /bin folder. After that, rebuild the project and try to run it.
I hope one of these works out for you.
This problem is occur some time when you replace new debug.keystore file with the old one.
delete deug.keystore may fix the problem
eclipse is working fine with importing a project which already exist. But i am facing problem while am creating a new project in the android.
And then am trying to change the path in the properties of the project which i have created then it is showing some kind of error and screen shot of it is
Can any one help me in this.
Assuming your d: drive is an actual hard drive you have the android-sdk in, and not some DVD/CD drive you tried installing the android-sdk from.
You should click on your new android project folder, right-click and click on "close unrelated projects", then the right files will get generated correctly (re-initiate a manual rebuild if you have to).
The problem was that Eclipse was trying to rebuild all the projects you had in your workspace, a number of which already contained errors in them. Not only those other projects were clogging up your error log, but when an error is detected by the packager/builder, the building process gets stopped entirely.
Now just in case this wasn't your only problem, do Help > Check updates
After that, click on the menu Window > AVD Manager and something
and make sure that you have the latest SDKs and AVD updates already installed.
Also be aware that Pulsar is not the recommended version of Eclipse for doing Android development, although this probably wasn't what was causing your problem.
Just my a new Android phone and I've been tinkering with some basic apps. It's been driving my crazy that the Android plugin for Eclipse refreshes externals folders whenever I save ANYTHING. Normally I wouldn't mind but when it takes 10s to refresh I start to notice.
I already searched and other people have this problem, but there are no solutions.
If it matters, Eclipse 3.5 running on a 64bit jvm on Ubuntu 9.10
If you have references to external sources put them in a zip file:
YourProject->rightClick->Properties->Java Build Path->libraries->..., and then most notably android.jar, but other libs can be the culprit too. Expand it and and select Source attachment, and then (if it doesn't say 'None') press the 'Edit...'-button. If that points to a directory waht you should do is compress that source-directory into a zip file and make the source attachment point to that file.
Apparently eclipse/adt feels the need to refresh sources on the file-system. When they're in a zip-file it seems confident that they have not changed....
You could try disabling "Build automatically" from the Project menu.
First of all Eclipse has a cool feature called a Preferences menu which is located under the window menu located at the top of the screen. Inside there are all sorts settings for pretty much anything you could want to adjust, including the option to turn off Native file system hooks and polling (under General -> Workspace). This is the actual solution to your problem as disabling build automatically doesn't solve the external folders issue, as soon as you build your project it starts right back up with refreshing them. Just keep in mind that if you update your Android SDK at all you will probably need to right click on the root directory of your project and hit refresh after the update finishes.
Secondly, as far as Netbeans is concerned there are at least a half a dozen pages worth of forums posts and various methods for using the Android SDK with it that are also available through Google, I'd give it a look.
I generally do the above step of turning off Automatic build and also try to have not more then 1 open project in my project list.
I myself am fed up of Eclipse from this. Importing a big android project 'ALWAYS' hangs my eclipse and i have to force close it and restart it.
P.S. I really wish google would create an Android plugin for Netbeans =(