score:96
Copy your project to a new one (Ctrl+c & Ctrl+v).
Change the package-name in your manifest
Rename your main package with refactor. Don't forget to select.
Change your application name in manifest
application android:icon="@drawable/icon" android:label="**new name**"
score:0
Another thing I noticed is that if you leave android:label="@string/app_name"
it somehow keeps the original app name when you view the copied app in the list of Applications in Settings > Applications > Manage applications
but if you change it to android:label="Your App Name"
it seems to work ok.
Also be sure to change your icons properly by deleting the old ones and importing the new ones.
score:0
I went to the workspace folder on C:/ (path different for all) copied the project folder (Project A), and pasted it with a new name (Project B). Change the name while in explorer. Then, through Eclipse, made a new android project with the new name (Project B). Different way of doing it.
score:0
I Just wanted to add this after struggling with a code i have at work:
DO NOT USE THE PACKAGE NAME EXPLICITLY IN YOUR JAVA CODE NO MATTER WHAT. YOU MIGHT NEED TO RENAME YOUR PROJECT . EXAMPLES ARE : getResource() and setting the Bitmap source and such and such
it looks like that I had bad references to the package name. it name was used explicitly as a String (e.g "com.pakge.mypkg" ) instead of Context.getPackageName() .
try to reach this method anyways you can 'cos the way i just mentioned it might not work for you... try to reach the method name "getPackageName()" from different other objects.
score:0
I have to answer not comment as reputation not high enough - to say that I agree @jengelsma has the best answer, just copy and paste, but watch out for the (hidden) SVN files (in .svn folders)! Unless you want the same references as the other project you don't want these.
Team > disconnect and check 'also delete SVN meta data' on your new copy to do this.
score:0
Just want to add some more points :- Be ensure that the package name must be different for new project and old project if both project are going to install on same machine.
also modify the same in Mainfest.xml under
score:0
I used the eclipse Luna, I tried to copy an existing project (Project_A) as below
- Create a new Java project (its name is as Project_B)
- Right click on Project_B (to pop up the context menu)
- Select the menu item "Import..." (to show the "Import" dialog)
- On the list under the "Select an import source" field to extend the item "General"
- Double click on the sub-item "File System" (to show the "File System" page)
- Enter the path of "Project_A" directory into the "From directory" field (or click the "Browse..." button to find and select the directory of "Project_A")
- Check the checkbox of "Project_A" directory under the "From directory" field
- To see if the "Into folder" field is showing folder name as "Project_B" (if not, click "Browse..." button to find and select the "Project_B")
- Click the "Finish" button (because the Project_B is empty, need not care any more)
- The all contents of Project_A are copied into Project_B, we can run the Project_B as the Project_A (if needed we can refactor the Project_B)
score:1
As said above all you have to do is copy+paste the project and rename it ["myApp.11"] but sometimes this feature gets bugged in eclipse. One such case happens when you have more than one version of the jdk. to solve this close eclipse rename the older versions of the jdk with an underscore e.g. _jdk17.2 and retry. if you dont need these versions delete them.
score:3
There's now an automatic tool for that, part of the ADT.
- Make sure the origin project is open in Eclipse, copy & paste to a new name
- Right click on the new project > Android Tools > Rename Application Package
Done
score:5
Mandatory tasks:
- In Eclipse, Copy and paste the project. (Give the project a new name)
- In Manifest, update the Package name and save. (Update Launch Configuration)
- Refactor and rename the Package name. (Update references)
Optional tasks:
- In Manifest, change the Application label and icon, so after
installing the application on your device it won't be confused with the first one. - Refactor and rename the java files name, so they won't be confused with the original project files.
- If you have used Encodings such as UTF-8 in your project (in order to handle languages other than English) you might need to edit and save those files so their font would be shown correctly.
Note: If you do the 3rd task before 2nd task, some undesired imports would be added to your java classes. You then will need to remove those imports.
score:17
If you are using Eclipse and all you want to do is clone your Android project and give it a new project name, simply do the a copy/paste (Ctrl-C & Ctrl-V - step 1 in Mur's answer above). Eclipse will ask you for a new project name when you paste and you're done. The Eclipse project name and directory are independent of the application name and package.
score:23
I just want to add an item to Mur Votema's list:
5) Don't forget to open the project you want to copy!
It just cost me some minutes to find out that it doesn't work with closed projects. :-)
Source: stackoverflow.com
Related Query
- Android - copy existing project with a new name in Eclipse
- some problems with my eclipse when create an new project from existing android code
- How to use an existing Project as a template for a new one with Eclipse (CDT)?
- Import eclipse project with other package name ? - Eclipse / Android
- How to create an android Project from existing source in eclipse with ADT 20.0.X and SDK r20
- Eclipse CDT - new Makefile project with existing code - change global default build target
- How to import an Android project in to eclipse with out creating a new one from source?
- why is Eclipse file > new > android application project producing a gutted folder with different folder icons?
- Create new android project with out Fragment activity in eclipse
- Eclipse with ADT - Cannot Create New Android Project
- Trouble using cardslib with existing Eclipse Android project
- can not create new android application project in eclipse but can import and run existing
- Create new project on Eclipse with existing Java files
- An issues in Creation a new Android Project with Eclipse
- error in every new android project with eclipse
- error in every new android project with eclipse
- Eclipse "Invalid Project Description" when creating new project from existing source
- Associating existing Eclipse project with existing SVN repository
- Eclipse ADT: Project name "appcompat_v7" being created after creating every new project
- "Module name is invalid" when exporting an existing eclipse project to a war file
- Cannot create a new Android Project using Eclipse
- Error importing Maven Android Android project to Eclipse with ADT 20
- Javadoc for Android project in Eclipse fails with NullPointerException
- SRC folder in Eclipse is empty (MainActivity class not created) after creating a new android project using Eclipse
- A project with that name already exists in the workspace eclipse
- eclipse, new android application project, "next button" is disabled in section that wants the project name
- Use new firebase sdk in android eclipse project
- What is the difference between Eclipse "Import" and "Create project from existing source" for Android projects?
- How to use Linked Files in Eclipse for PhoneGap project with Android
- How to create new android project in eclipse and share in local git repository?
More Query from same tag
- R cannot be resolved to a variable in a new project
- Tomcat 7 maven plugin additional context on tomcat7:run
- gurobi.GRBException: No Gurobi license found
- How to find static method calls in large Java project?
- What do files deleted by groovy leave behind in Windows 7?
- How to make a jar file out of Google Appengine Java Project
- spark submit in client machine
- where i can find substitute of red5plugin link?
- How do I make multiple Android apps from a single code base?
- In scala eclipse how do I use a library in my workspace
- Java - [Var Type] Cannot be resolved
- Exclude JUnit from Eclipse exported JAR
- Cannot create a cpp project with a static lib in eclipse helios
- eclipse cygwin source path mapping not working
- Eclipse error when I debug project
- While loop does not finish
- Copy string to strings.xml
- Which Eclipse project type do I need, to use existing code and generate a makefile
- JSON Responce data Getting at Console i used Java,Eclipse,Tomcat
- How do I let jenkins and m2eclipse share the same maven repository
- Some JPanels are not showing in my CardLayout Panels
- Export Eclipse RCP Product -> "Unresolved requirement: Require-Bundle: org.eclipse.ui.views"
- Compiling java using Maven
- How to make Eclipse always "Copy projects into workspace"?
- Using Art instead of Dalvik to compile
- Attaching an Eclipse detached view programmatically
- How do you sort elements underneath a project during Eclipse Plugin Development?
- Getting NPE at p2.console
- New JBoss generation and configuration on Eclipse
- Run .sh script instead of an executable