Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
10/02/15 03:15 AM (8 years ago)

Rename Package Name Android Studio

Hi, I received an application through an application transfer. I want to update this application with an application buzztouch. 2 questions : - Is it possible to do an update without having the same certificate ( but I think not) ? - I have to use the same package name , is there a simple way to change the package name in android Studio ? Thx
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
10/02/15 04:14 AM (8 years ago)
You must have the original certificate in order to update the app in the Play Store. If you do not have it, you will have to publish a new app (and then guard the keystore file with your life, so to speak). To change the name of the apk file, export it for release and then change the name of the apk from within the operating system itself. It is also possible to change the name of the apk in the Android Studio, however, I never bother to do that.
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
10/02/15 04:56 AM (8 years ago)
It is the package name (com.example.nameApp) that I want to change no apk file.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
10/02/15 05:00 AM (8 years ago)
Package names of Google Play must be universally unique. If you change the package name, you are publishing a new app, as simple as that. >is there a simple way to change the package name in android Studio Not really, you shall best change the package name by changing the name of the app in the Core section of the BT control panel. BT will add com. in front of that name and that should be it.
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
10/02/15 05:02 AM (8 years ago)
I know, I'm looking for how to change the same as the first version
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
10/02/15 05:10 AM (8 years ago)
Have you tried any of the solutions described here? http://stackoverflow.com/questions/16804093/android-studio-rename-package
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
10/02/15 05:33 AM (8 years ago)
Yes I tried but no changes
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
10/02/15 05:38 AM (8 years ago)
How about create a new app with the desired name and then copy the existing files (java, xml etc.) into it?
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
10/02/15 05:48 AM (8 years ago)
I tried but the problem is that there are a lot of mistakes because the paths of the various files are incorrect it causes me a lot of errors on files
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
10/02/15 05:54 AM (8 years ago)
My error is : Your APK package must bear the name "com.dev2a.rainbow.robonumerique" and with buzztouch my APK package is com.robonumerique
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
10/02/15 06:07 AM (8 years ago)
Can you go to Eclipse first, change the package name there and then import it into Android Studio?
 
Bertrand
Apple Fan
Profile
Posts: 163
Reg: Dec 26, 2012
saint-quentin f...
4,680
like
10/02/15 06:08 AM (8 years ago)
I don't have Eclipse just Android Studio
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
10/02/15 01:19 PM (8 years ago)
It can be alot of work but nit more than 30 minutes maybe. It's easier just to change the package name in the control panel and redownload the package.then really if you made any changes programmatically or whatever, you can just copy the old code. But then you would have to change package name again to correct one, but that doesn't take but a couple of minutes.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/03/15 10:04 PM (8 years ago)
Agree with Dusko and CMCOFFEE here. Dusko's spot on in terms of the market. CMCOFFEE seems to do it the way I do. In MOST CASES Andorid Studio and Eclipse are horrible at "refactoring" - a fancy word for doing this sort of thing. The menu options exist, they just suck and normally hose the entire project. Lame lame. I generally do this manually. It really doens't take too long to manually copy/paste the package name in each file. There aren't that many of them. The package names are at the top of the .java files and rarely in the code itself. The Android Manifest has the package name and the Gradle build config. You could do a global search in the project and just overwrite them manually. That'll get your project going but you still won't be able to update the app in Google Play without the original signing certificate. This is likely on the machine that the original developer used. Giving it to you is another pain-in-the-ass process.
 

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.