Eclipse compare project with local history not available? - android

I was looking for an easy way to backup an android project in eclipse and found this question: Android is there a easy way to back up your android project? the selected answer states that "You can also revert to a previous version if you are using Eclipse. Eclipse has this nice functionality called Local history that allows it. Right click on a file and use "compare with..." -> "Local History"."
However when I right click on the project and click compare with I only see the diabled option "Each other"
I checked Preferences > General > Workspace > Local History but everything seems ok.
Why isn't Eclipse backing up my project? What do I do to enable the option compare with local history?
EDIT I was clicking on the project folder and realised this function only works for individual files, what I am looking for is to restore the entire project. Is it possible to enable this on Eclipse?

Nope, it just does it file per file. Eclipse is not meant to be used as a version control mechanism. Notice that even though that's the "accepted" answer, it has only one upvote. The one with more upvotes is what you're looking for in this case. Just invest a little time to use a real Version control mechanism (like Git).
Also, Eclipse would not really "back up" anything, since everything would still be local and if your hard drive crashed, everything would be bye bye anyway.

Are you against an SVN? I use Subversive and it seems to work fine for backing up/creating new projects and updates/restoring to older versions if necessary. You can set up a repository on a separate web server or on a local file server. You can get local history but I don't believe this is very reliable. I would use regualar backups or set up an SVN. Once you get it set up and install the plug-ins, it works pretty well.

Related

Best way of version control, stable builds and exporting/ a project on multiple devices

today it's a shorter question I'd like to ask, to hear your opinions as I suppose some do this differently than others.
First of all,, I have an Android Studio project and am rather a novice on this subject of Android Development. That's why slight changes in the java or xml files could and did make my latest app unstable/ crashing.
Therefore I was asking myself wether Android Studio offers a way to backup stable builds - I could imagine this like a save-as option where you backup the working version and continue working on the the one but have a stable one backed up.
I know there's the export project function but I tried it out a couple of times and having worked on a project on the same device before, prior to reimporting a project causes an error and that's not the way I guess you should handle it in this situation.
I was looking at Google Cloud for using both version control and the option to commit new versions to the trunk and update them at a different location (different device). If that's the solution you propose, I need to look more closely into the documentation to get it up and running (set up the repository already but no clue how to commit changes/ versions).
So, long story short, what tool/ option do you prefer to have an export and a version control option unified for Android Studio?
Interested to hear and thankful for any advice on that!
There are multiple solutions,
Just find your solution/project in your file explorer and back it up, if you need it again just open the project with Android Studio. (not the most popular one)
Use a version control system like git. Link to tutorial (This is the most popular one), If u are unfamiliar with git, just google it and there are tons of examples and documentation. With git you can tag commits and after u mess up revert to the tagged commit
Git is the simpliest.
It's supported by AndroidStudio and later on you can upload your project to GitHub to access it from anywhere.
You can use it with terminal and shorcut keys, incons as well.
You also can make separate branches in order to make and test more versions parallely.
For more info take a look at: https://git-scm.com/about
and of course github: https://github.com/
Regards,
Cs

regarding Backing-up a work-space in Eclipse [duplicate]

I got into this learning the Android Operating System. I'm still in learning mode. Along with learning Android, Seems I'm getting a bit of a refresh on Java, and because most of the examples I find expect you to use Eclipse... well I guess I'm also learning Eclipse (This is a good thing, I'm not complaining)... This question is primarily about Eclipse, and how to perform a rudimentary save of my current state.
I'm running without a Version Control system. Something I will fix once I have a good feel for where I'm going, what I want, and what I need it to do, so for the moment, I'm just looking for some advice on how to save (perhaps quite crudely) my current state of affairs, and be able to restore to that point if I manage to mess up my world.
Question 1:
If I just copy my entire workspace to a different location (CD Rom?). and then perform tasks / experiments - on the original workspace (Create new projects, create project from existing sources, deleting projects.... all in the saved workspace) and really manage to trash the workspace, or maybe I just want to go back to my saved point, and try the same things in a different manner.... Will exiting Eclipse, deleting the modified workspace recreating the workspace at the same location, from the CD Rom, and maybe running "Clean All Projects" - safely put me back to my origin saved point?
Question 2:
If not. What do I need to do, to accomplish something morally enlivenment to this?
Perhaps this is already answered in some web documentation I haven't found. Pointers to a couple of well written web pages may be all I need?
Thanks for any advice
Joe
You don't even have to delete your workspace. In one of the menus there should be an option like "Change Workspace". I believe this will accomplish what you want. Just change your workspace to the backup.
Eclipse saves almost everything into the workspace so backing that up is sufficient in most cases. The only other instance I have encountered is installed plugins which are saved under the eclipse folder.
Be sure you backup "hidden" files as .settings is hidden on some OSes.
You just have to copy your work-space back to your PC and use that work-space from eclipse to return back to your saved projects..

Android Marketplace Updates & Eclipse Projects

So I have managed to get a couple apps up on the marketplace only to have a stray thought of what is the best way to go about managing my projects/apps within eclipse to accommodate future updates to the marketplace. My question resides within Eclipse and what to do with my projects/apps as I apply updates.
Do I simply copy my project/app, paste it and the increment the version information accordingly? Or am I continuously working on my published project/app? Or...Is there a recommended/preferred method of going about this. Since they are up and good on the marketplace I am leery of doing something that will cause problems for me later on down the line.
And don't change the package name....correct?
This is what I currently have on the Marketplace...
Wind Chill Calculator
True Love Game
First of all, everyone's posts were very helpful and I have spent some time looking over documentation through the links provided.
So...and brace for impact as I say this. Being one who has NEVER used any form of SCM for my projects this is all new to me (as everyone's faces cringe), which is why I am asking the original question in the first place. I hate to say tell me anything without doing my research...so within the past few hours using git within eclipse I have gleamed the following:
Team > Share Project ...ignores...any tags(for version info)which is what I am after...commits...THEN
Clone? File -> Import -> Git -> Git Repository at this point once I have cloned my project do I create a new tag with the new version info, and go through the commit process again? If this is the case I now have two items in my Git Repository. One of which has the single tag of 1.0, and the other item which contains two tags 1.0 and 1.1, and when I look at the history I see two tags Version 1.0 and Version 1.1. Then I just switch between the resources I need from within the repository?
I just want to make sure my process is correct before I begin to implement some of this on existing projects that are pretty extensive already. As for the rest I am just going to learn on the fly...branches
You might want to use a revision control system like SVN or git or one of dozens of other options, and continuously update the single project in Eclipse. The benefit of using source control is that you can branch into a new project for major changes, update your existing code for minor changes, and tag the branches so you can revert back to an old snapshot in the future.
I personally use bitbucket which is hosted remotely and is free. It supports SVN and Mercurial.
No, dont change the package name, that will make it new app, instead of upgrade of original.
Use a version control system, like SVN.
Manage Tags for a complete working state of code(through svn), so you can always revert back to that tag.
When ready for new release, increment version no. etc and update on market...
EDIT After addition in question:
Don't get much confused with various GIT/SVN working.. There main purpose is that they will allow you to switch your code back and forth to any point in past, that allows you to code in a way properly knowing that you can always revert back to a Working state.. and it is definitely of much more benefit in a Team , when multiple people are working on same codebase and possibly same files...
Being a long-time user of SVN, I recommend subclipse (svn for eclipse). When you're ready to release another version of your app, create a 'tag' for the release version and you'll always be able to go back to that exact version.
SVN has excellent docs. There is also TortoiseSVN for repo work outside of eclipse.

What are Steps to grab the samples from AndEngine Repository

I had tried to grab the samples of AndEngine using Mercurial eclipse plugins, but that was firing some sort of error to me again and again. So, can someone please let me know what could be the easiest way to get the AndEngine examples or samples from the repository. I am working on Windows.
Thanks.
Update:
Change the Mercurial client from the built in one to TortoiseHG (in the Eclipse preferences).
Previous Answer:
Plan A: Make sure to use native Mercurial with EclipseHG (not the one which ships with the plugin). You can find the settings the preferences dialog. Last time I tried, the built-in version was broken. If it fails again, copy and paste the error message.
Plan B: Try TortoiseHG
Plan C: Give us a concrete error message. (Which should actually be Plan A ;) )
You download the zip from https://github.com/nicolasgramlich/AndEngineExamples

Android/Eclipse - How to get class member dropdowns, etc

I've only been using Eclipse since installing it to use for Android development. I was previously using Galileo, but the other day downloaded Helios (the "Classic" config as recommended on the Android site).
My project builds and everything is OK except that I no longer get the code-completion dropdowns when typing. In other words, when I type "this.", I do not see the popup list of all the members and methods. Eclipse does know everything about the classes, as hovering the cursor over anything pops up the expected info.
Am I missing a preference setting or something else? The preferences are pretty complex and I'm not sure what the feature that's lacking is called in Eclipse nomenclature.
Doug Gordon
java > Editor > typing
there should be an option in there.
does ctrl+shift (or is it alt+shift) work?
I generally turn off that option anyways as I feel it just slows me down.

Categories

Resources