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.
Related
Let's say I forgot to commit at the moment of compiling my APK.
I continued modifying my files, and then committed later on.
Can I go back to the precise moment of APK compilation, which is unfortunately between two commits?
No, you can't do it - some things you can do is either go back to your old commits and start again(not recommended)or:
If the change was not so large you can see what exactly did you changed and start hard copy-pasting and return to your old version of the code.
But the best thing I can recommend is to use branches - start a production branch(only stable code goes there) and dev branch(in this branch you can modify your code as you want because you have another stable working branch)
Edit: as Zoe mentioned in one of the comments - check for local history in your IDE (the link gives example for android studio IDE)
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
I am new to Git and do not understand everything yet. I usually commit after each app update and then create a new branch for the next app version, so that I can correct bugs of the currently published version while working on improving the app for future versions.
So far it was just a precaution and I never really used it that way but I want to get serious about Git capabilities. And I face this problem:
I have two branches in addition to the master, and if I compare the files from the two branches, I can clearly see the differences.
However, if I "checkout" from one branch to the other, nothing happens and it seems that the current code is just reassigned to a different branch.
But what I want to do is to be able to modify both codes in parallel.
How does it work?
Thanks.
First you have to do the changes in one branch. Then you can share the same change to other branch using git. There are multiple ways to share the changes, based on the different scenario.
They are "Cherry pick", "patch", "merge" and "stash"(additionally shelve in android-studio).
Based on the scenario shared above, you can use patch to share the code among branches.
Make changes in one branch and commit it.
Right click the commit in android-studio and select "create patch".
Checkout to another branch.
Select options VCS ---> Apply Patch.
Select the "patch" file and apply it.
Now you can able to see the changes you made in the "other branch" in "current branch".
Then you can commit the changes in the regular way.
I have a project template , when i want to produce a unique application manually to update it to the market. I will follow these steps :
Right click in the package name
Refactor, then Rename
Renaming the package in minifest then update the version code
finally to clean the code from imports errors such as *.R; errors
My question is there any tool that automate this refactoring process without being involved on it ?
i tried to create a java tool but it consumes memory and some things i have to finalize it manually , i'm searching for this since 3 days and nothings gives you a clear answer.
My question is there any tool that automate this refactoring process without being involved on it ?
The new Gradle-based build system can handle this scenario. In fact, it allows you to separate the package name used by R.java (to keep it consistent) and the package name used for determining whether the app is unique on the device and in the Play Store.
I recommend that you watch "The New Android SDK Build System" video from the Google I|O 2013 conference to learn more about what it can do, as Xav definitely covers this scenario.
Note that while it is not a "right click", it should make scripting a solution fairly easy.
Thank you all, I've solved this problem by converting the template project into JAR and let another small project handle every thing , I've created a small method that updates the minifest in that small project and i had to update package,ver name and ver code ONLY ,then I've generated the APK using ANT ,however i tested the project and it works fine , hope this will help another people
Me and my friend started building our first app on android. We started on one laptop and then copied project to another laptop too. Now we started doing our part on android separately.
Now i have to combine the work in one app, So when I tried to import the other project to my workspace, it says "Some projects cannot be imported because they already exist in the workspace" I tried changing my package name too. But even after that, the same warning comes. what to do? thanks
You need to set up some sort of repository with version control, then both of you can check out code, work on it and check it back in. The versioning system will keep track of everything, perform merges and flag conflicts for you.
Some info about Revision Control
And a list of various software
If you don't want to do version control, you can use a diff program to comnpare the two files and merge the differences. Set it up to compare, make the changes to "your" copy, and you should be set to go.
I've used ExamDiff to great success before (they have a very usable free version).
And here's a list of diff software.