On Sat, Dec 3, 2011 at 11:43 PM, bob <[email protected]> wrote:
> Let's say you have an Android game.

You have an Android game.

> You want to duplicate the project
> and change the package name to make a new game.  Is there a simple 20-
> second way of doing this?  I've tried many methods and somehow this
> always takes about half an hour of fiddling for something that ought
> to be trivial.

Assuming that you're using Eclipse:

Step #1. Copy the project directory to a new directory.

Step #2: Import the new copy into Eclipse, giving it a different project name.

Step #3: Fix up the manifest to have the new package, and double-check.

Step #4: Use Eclipse refactoring to move your source code to the new
package, which will handle all of the directory/package statement
changes.

Step #5: Double-check the manifest to ensure that all your components
still have the right android:name attributes after the refactoring.

This will probably be more than 20 seconds but should be less than a
half-hour for reasonable-sized projects.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to