Eclipse slow at building Android resources - java

I'm using Eclipse to develop Android apps.
I'm using the latest SDK and Eclipse 3.6, my computer is macbook air with 4GB of ram.
Everytime I change a resource file ( an XML layout for example ), it takes eclipse between 1mn and 2mn to actually rebuild the binary and deploy it. My binary is about 10M ( it's a game with lots of bitmaps ).
It's very hard to program with such high response times, any way to make it shorter ?

If you have a lot of graphics you might want to read this android-dev post. aapt optimizes pngs during a build (perhaps unnecessarily so) but only if the extension is .png (case sensitive). Renaming them to .PNG skips the optimization step but the images are still useful when referenced.

They are fixing this problem and it's available in ADT 12.
http://tools.android.com/download
http://tools.android.com/recent/finercontroloveradtbuildprocess

Are you using maven or such? Eclipse + Maven both have a builder, and they tend to fight a lot if both are enabled.
(honestly the best answer is use Intelli-J, and everything will magically work, but I doubt you want this answer).

Remove the check Build Automatically in Project menu, in this way you are not continously compiling. In Android resources are highly optimized so compilation in an application like your can take time.
You can manually compile when you have done significant changes.

ADT 14 will solve this.
http://tools.android.com/download/adt-14-preview

Related

Eclipse Oxygen: How to automatically upload php files on remote server

I'm coming from NetBeans and evaluating others and more flexible IDEs supporting more languages (i.e. Python) than just php and related.
I kept an eye on Eclipse that seems to be the best choice; at the time I was not able to find an easy solution to keep the original project on my machine and automatically send / syncronize the files on the remove server via sftp.
All solutions seems to be outdated or stupid (like mounting a smb partition or manually send the file via an ftp client!
I'm not going to believe that an IDE like Eclipse doesn't have a smart solution of what I consider a basic feature of an IDE, so I think I missed something... On Eclipse forums I've seen the same question asked lots of time but without any answer!
Some suggestions about is strongly apreciated otherwise I think the only solution is stick on one IDE each language I use that seem to be incredible on 2018.
I'm developing on MacOS and the most interesting solution (kDevelop) fails on building with MacPorts.
Thank you very much.
RSE is a very poor solution, as you noted it's a one-shot sync and is useless if you want to develop locally and only deploy occasionally. For many years I used the Aptana Studio suite of plugins which included excellent upload/sync tools for individual files or whole projects, let you diff everything against a remote file structure over SFTP when you wanted and exclude whatever you wanted.
Unfortunately, Aptana is no longer supported and causes some major problems in Eclipse Neon and later. Specifically, its editors are completely broken, and they override the native Eclipse editors, opening new windows that are blank with no title. However, it is still by far the best solution for casual SFTP deployment...there is literally nothing else even close. With some work it is possible to install Aptana and get use of its publishing tools while preventing it from destroying the rest of your workspace.
Install Aptana from the marketplace.
Go to Window > Preferences > Install/Update, then click "Uninstall or update".
Uninstall everything to do with Aptana except for Aptana Studio 3 Core and the Aptana SecureFTP Library inside that.
This gets rid of most, but not all of Aptana's editors, and the worst one is the HTML editor which creates a second HTML content type in Eclipse that cannot be removed and causes all kinds of chaos. But there is a workaround.
Exit Eclipse. Go into the eclipse/plugins/ directory and remove all plugins beginning with com.aptana.editor.* EXCEPT FOR THE FOLLOWING which seem to be required:
com.aptana.editor.common.override_1.0.0.1351531287.jar
com.aptana.editor.common_3.0.3.1400201987.jar
com.aptana.editor.diff_3.0.0.1365788962.jar
com.aptana.editor.dtd_3.0.0.1354746625.jar
com.aptana.editor.epl_3.0.0.1398883419.jar
com.aptana.editor.erb_3.0.3.1380237252.jar
com.aptana.editor.findbar_3.0.0.jar
com.aptana.editor.idl_3.0.0.1365788962.jar
com.aptana.editor.text_3.0.0.1339173764.jar
Go back into Eclipse. Right-clicking a project folder should now expose a 'Publish' option that lets you run Aptana's deployment wizard and sync to a remote filesystem over SFTP.
Hope this helps...took me hours of trial and error, but finally everything works. For the record I am using Neon, not Oxygen, so I can't say definitively whether it will work in later versions.

Is it possible to install all Eclipse plugins?

Possible silly question alert.
Being a bit of a hoarder, when I noticed that you can check all available sources after downloading Eclipse and then download and install all of those plugins I was ecstatic! I don't have to do that all manually! Yet I've tried it twice and each time I try to install all of them I can't boot Eclipse back up (it just hangs on the splash screen with no loading messages). I've tried deleting my .metadata folder and running it via ./eclipse -clean but both haven't helped. Is it just not possible to run with every single plugin installed?
Thanks!
"Hoarding" can turn into a very bad habit.
Maybe this is your chance to learn to you should try to resist the impulse "add more, please".
Keep in mind that Eclipse is a TOOL to help you creating better software. It can't help you when you blow it up to a degree that it is just busy with managing all the things you added.
I would even suggest to act in an opposite way: ONLY use the plugins and features that help you to get your job done. But for those plugins - learn to USE all the functionality that they offer to you. So, if you want please the "inner hoarder" in you: tell him to hoard knowledge; not things. "Things" consume space, and finally "energy" - there are good reasons that the Chinese art of "Feng Shui" asks people to keep LESS items around.

Recovering Source Code from Unfinished App on Android Phone

For the past month and a half I have been working on a project, an app for Android. Today my computer crashed. Apparently the backup didn't backup the source files for any of my projects though; it only backed up the drawable folders for some reason?
Anyway, I was wondering if there was a way to recover the source code from the app on the phone somehow. I never fully finished the app and created an .apk or anything, but I ran it on my phone several times for debugging purposes, so it is on my phone in a fairly recent state. Is there a way to somehow recover the source code for this? I would hate to have to redo anything, but it seems like I'm probably going to have to end up doing that.
I began the project in Eclipse Indigo but later switched IDEs to IntelliJ IDEA. The files I currently have on my computer are:
An EML file for the project. It appears to be blank.
The drawable folders
And that's it. Any ideas?
You can use dex2Jar to get a jar and then use JD-GUI to examine the code. Since it is decompiling it will not be exact, but close.
dex2jar: http://code.google.com/p/dex2jar/
JD-GUI: http://java.decompiler.free.fr/
You could look into this as an option:
It is a tool for reverse engineering 3rd party, closed, binary Android
apps. It can decode resources to nearly original form and rebuild them
after making some modifications; it makes possible to debug smali code
step by step. Also it makes working with app easier because of
project-like files structure and automation of some repetitive tasks
like building apk, etc.
http://code.google.com/p/android-apktool/
You can try file recovery softwares to get back your deleted files from your hard disk(if it is working).
These softwares worked for me in recovering pictures from a formatted SDCARD. So you can give it a try.
You may be able to use IntelliJ IDEA's "local history" feature. IntelliJ keeps track of all your edits in .IntelliJIdea10 folder in the use home. If that folder has not been damaged in the crash you should be able to recover all your codes.
Just right click on the module directory in the Project tab and select Local History > Show History. Wait for the list of history items to load, it may take a couple of seconds. Right click on an item in the left panel and select Revert.

Android development with notepad-like editor and command line

I have a problem with Eclipse. It is very slow for me. My PC is an old PC and I'm not comfort with the performance. Is there any lightweight alternative to Eclipse (Available for Windows and Linux)? I want SPEED!
My ideal is to write my code in an editor like Notepad and supplement with the command line! How can I compile my code in this environment? How do I update my R.java file or build my project's configuration?
The documentation provides very nice instructions about using the command line tool. The building is performed with the aid of Ant tool. You could also use a more advanced editor than notepad (Notepad++ for example).
However, if you have a slow machine, you would suffer during development anyway. You should also forget about using the emulator for debugging. The emulator would take ages to load.
see the link managing project through command line
It provides a brief description about how to develop android app without any IDE
If you want speed, you should buy a faster computer.
It seems that you are a beginner -> I would suggest purchasing almost any java book, or visiting websites with tutorials, if you are at the stage where you don't know how to compile your code.
well, nothing holds you back to use notepad and manually compiling with javac:
http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javac.html
Like kgiannakakis pointed out; you'll also need the Android SDK:
http://developer.android.com/sdk/index.html

Eclipse Helios having performance problems Mac OS X 10.6.5

Short Story: My house was broken into MacBook Pro among stolen items. Bought a new MacBook restored from TimeMachine drive including Eclipse folder. System files could not be restored because hardware was slightly different. I did a system update and updated to 10.6.5 and Java 1.6.0_22, all the latest. I run Eclipse Helios for Java development for college assignments.
The problem I am having is that when I run Eclipse and start coding when I get to a method of any type when eclipse usually throws up an auto-complete type box underneath the current line the program hangs for a few seconds while it loads / moves through the list depending on how fast I am typing. Example:
JTextField txt = new JTextField();
txt.get....
I could type the second line out pretty quickly as I know what I am looking for but the program will hang (multicolor swirly mac icon will replace pointer). Eclipse process will spike to 100% and I will not be able to do anything until the auto-complete box finishes whatever it could possibly be doing and the suggestion moves down to "getText()" or whatever the list beginning with "get" contains.
Things I have done to correct include, re-downloading and installing eclipse into another location, creating a new workplace in that eclipse install, re-creating the projects and code files by hand (i.e. not importing anything). The problem still persist.
I am not seasoned enough in Java to abandon the helpful suggestion box, especially when I am learning new things.
Anyone else experience this problem or know a possible solution I have not tried?
This happens with me with Android development, and I have a clue as to why - documentation! If I uninstalled the documentation, meaning the completion list wouldn't show me any API documentation, the completion list was back up to normal speed. Installed it back, the completion list is slow again. This wasn't a problem in Galileo, just Helio.
I'm trying to find the best JVM settings to use with eclipse to see if I can improve things.

Categories

Resources