Discussion Forums  >  Uncategorized

Replies: 8    Views: 1066

paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
01/19/11 03:02 PM (14 years ago)

how to change a package name for android

Anyone know how to change the package name for an android application and avoid errors so I can submit 2 similar projects as 2 separate applications? com.org.myproject1 to com.org.myproject2
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/19/11 10:54 PM (14 years ago)
The best solution is going to depend on what content you want in the new app and the old app. Because the apps are designed to download configuration data from the buzztouch server when they launch, each app has a unique id. It's this app id that tells the phone what content to fetch. So, unless you want the exact same content in both the apps (and I do mean EXACT) then this may not be worth doing? If you really REALLY want two identical apps with different titles and icons... there are a few tricks you could try. Is this what you're thinking? If even one screen needs to be different (including the apps image on the home screen), it may be tougher than it appears. Or... if you think this makes sense... create a new app in your control panel... add the icon and the image for the home screen. At this point, you'll have an app skeleton without any menu or conent. Next... send us an email at info at buzztouch.com and we can run a routine on our end to copy the original apps screens into the new app. This would save some time on your end? Not sure what you're attempting.
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
01/20/11 09:21 AM (14 years ago)
actually its for another app of mine not created with Buzztouch. I have a radio app for android and I need to create others with only changing the stream url and images. The problem is I can import it into Eclipse and make all of these changes but changing the package name is kicking my butt. I searched alot of other forums and there's many others having the same problem and little solutions out there. Thought I would ask here also.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/20/11 09:56 AM (14 years ago)
It's only a matter of getting the package name in the manifest to match the package name (top level in /src folder) your are using then getting all the references to this name in the project the same (find and replace). Try command-click the package name then Refactor > Rename - works well on a Mac
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
01/20/11 10:02 AM (14 years ago)
Ok thanks I'll give it a shot and report back
 
paulwyre
Apple Fan
Profile
Posts: 139
Reg: Dec 21, 2010
USA
1,390
like
01/21/11 10:51 AM (14 years ago)
Ok here is the solution to this package changing name issue and this is why I am a HUGE!!!!!!! APPLE IPHONE FAN. Steps are listed below so anyone have this issue in the future this is what will solve it. Enjoy. 1. Open manifest.xml in manifest tab section there is field package?s name. 2. Change package?s name as what you desired 3. There will be may errors in the hierarchy of project, but don?t worry. Click on folder that have the error. 4. Right-click ? refactor- then rename 5. Change name into new package?s name. then just click until it finished. In this state the errors in hierarchy of project will be gone. 6. To be sure that there is no name of previous package are still define, we need to traverse all file source code to search it and using find function in eclipse then change it with new package name. -DONE- Hope this helps anyone else that runs into this headache because I spent days searching forums with bad instructions. I also have screenshots of changing my project if anyone needs further help. Thanks David and your Development team for Buzztouch.
 
jawdoss
Android Fan
Profile
Posts: 359
Reg: Jun 10, 2012
Gold Coast, Que...
9,090
like
07/09/13 06:40 PM (12 years ago)
Hi guys, It didn't work for me. Im still having the crosses in the SRC foder. When i hover over the folder it says 'R can not be defined as a variable.' Can you please help me with this?
 
jawdoss
Android Fan
Profile
Posts: 359
Reg: Jun 10, 2012
Gold Coast, Que...
9,090
like
07/09/13 06:43 PM (12 years ago)
I take that back sorry. I just used android tools to rename it. Its all good now, no one fret.
 
benedettoapp
Lost but trying
Profile
Posts: 139
Reg: Jun 22, 2013
Italy
6,340
like
12/02/14 01:28 PM (11 years ago)
Right click on the project -> Android Tools -> Rename Application package
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.