Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Android Eclipse constantly refresh external folders and take forver?

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

like image 624
basszero Avatar asked Jan 10 '10 22:01

basszero


3 Answers

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....

like image 72
Hans Avatar answered Sep 24 '22 05:09

Hans


You could try disabling "Build automatically" from the Project menu.

like image 31
Christopher Orr Avatar answered Sep 21 '22 05:09

Christopher Orr


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.

like image 21
Justin Buser Avatar answered Sep 23 '22 05:09

Justin Buser