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**"
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.
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.
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.
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.
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
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)
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.
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
- 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)
- 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.
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.
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. :-)
- 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
- Writing a Regex for Password Validation
- Eclipse Java Content Assist not working
- I am making some parts of java image transparent by some code, it works fine on the laptop I made, but not on others, Why?
- running java web projects using Eclipse and tomcat issue
- Update cvs and files with eclipse
- Using Subclipse with share drive specifically an office-like share drive
- Images under WebContent folder displayed as document Spring
- Android: Turning off text darkening while scrolling
- Jackson for beginners in Eclipse
- Eclipse - Could not publish server configuration for Tomcat8.0 server at localhost
- Is there any difference between using Java DB and Derby?
- Why are OpenNLP packages are not recognized within Eclipse IDE?
- Eclipse plugin for HTML WYSIWYG editor
- Adding v7 android support library to existing project
- Java autocomplete messes up end of line typing in Eclipse
- Using DatePicker and TimePicker dialog boxes - Android Java in Eclipse
- eclipse with Intel Fortran debugger
- Shortcut key to select word in Eclipse
- Recommended way to develop using Jetty and Eclipse
- Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/Handler
- Adding multiple class instances to a jframe
- Could not resolve artifact / missing artifact (Eclipse)
- Can/Should I name a Java project with an ampersand?
- FATAL EXCEPTION: main while Android application running
- Eclipse 2022-3 no longer support CVS?
- "Class header expected instead" error
- Eclipse error: cannot be resolved to a type
- Exporting JAR projects that use a common project
- Trying to use lambda for the first time and the code doesn't compile
- how can i see my table in gridlayout?