changing android package name - android

I want to change the package name for an app which is not yet published in the Market. Is there a way to use the new package name as the uniqueId on Market/Play and while still using the old package name in my code?

Changing the package name in the manifest will change how Google Play reads your package name. You don't need to change the package name anywhere else to accomplish that. In Eclipse, the package name for classes can be changed independently (directly under src).
As zapl mentions, you may need to handle a few manual items if your application package name differs from that of the classes within (shortcuts that assume everything is in the same package don't always work in that case). For example, using ".classname" may need to change to a fully qualified classname in the manifest and elsewhere.
If you're looking for a way to change the package name to be different in Google Play than it is in the manifest, then no you can't (it wouldn't be a good idea anyway). You can, however, use library projects to create a new app with the new package name without changing the original code or manifest. Minimal code/xml would need to be written.

Related

how do I change my apk-file to another Name

I'm making my own App and reached the point of uploading Apk - file. But it did not succeed, I'm told, to use a different package name, how do I do it? Vh melanie
In case of Eclipse, Goto your project and click on your package and PRESS F2 and rename to any other unique name. This is happen because you are using package name which has already been used.
Tell me if it helps. :)
Change the package name in your code for all your java files. In Android studio you can just create a new package and drag and drop all your code into it and do a refactor, the changes will get automatically be applied to all the files rather than doing it manually.
Next go to the manifest and change the package to the new one you defined, this is where the play store would be looking into to identify your app. As the package name defines your application's identity, so if you change it, then it is considered to be a different application and users of the previous version cannot update to the new version. The package name should be unique.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="add.the.new.pakage.name.here".....

Android - Change package name of live application

I have one application which is already live on google play named 'Moodlytics'.
https://play.google.com/store/apps/details?id=AnantApps.Moodlytics&hl=en
Currently its package name is 'AnantApps.Moodlytics'.
(I know its not good practice to use capital letters for package name)
Now I am going to give an update to my application.
So my question is : Can I use 'anantApps.moodlytics' (all with small letters) as package name instead of the original one? Will current live application will be affected by this or not?
No you can't, look here: http://android-developers.blogspot.nl/2011/06/things-that-cannot-change.html
Because the package name is an unique name of you package and android cannot determine if it belongs to your older package name. And so it treats it like if it were another app.
Unfortunately, you cannot "update" your application with a different package name. The package name of an application is case sensitive.
Once it's published, you can't do anything about it.
See : http://android-developers.blogspot.fr/2011/06/things-that-cannot-change.html

Can't upload application to google play

When I create application in Eclipse, I use default designer, and get application in namespace:
com.example.MyName
Now I try to upload app to Google Play, but getting error "Package Name "com.example" unacceptable. Please try another."
If I change name to com.MyName, I get a lot of error, like:
R cannot be resolved to a variable
What can I do?
You will need to change the package in at least 2, maybe more places depending on how complex your app is:
Change the package in the package attribute of the <manifest> element in your AndroidManifest.xml.
Change the package name in the src folder by right clicking on the old package, Going to Refactor -> Rename and typing in the same name you used in #1.
Beyond that, if your XML files use custom Views, you will need to update their class name as well. Additionally, you will need to update any other place where you've used a fully qualified domain name, like when launching an Intent from a component name.
Make sure your manifest is up to date.
Make sure your source code moved to the correct package.
Clean your project (Project > Clean). it will recompile your code and the R.java file.
Google Play does not accept the default com.example package name (to prevent everyone is going to use it, I suppose). Changing it to com is even worse!
Use a package with your name, company, application name, nickname, etc. to come up with something unique.
When you change the package of a class, you need to update the import-statements to the class and in the class (and possible other references to it, like the ones in the AndroidManifest.xml).
Just to be sure: you can clean your project to regenerate the automatically generated source files and recompile all classes.

How to release two android apps with same source code but different package names without refactor

I am looking for ways to release two android apps with same source code without any changes but with two different package name without refactoring.
How do I do this?
You need to:
Refactor code to change package name in a IDE (like a Idea or Eclipse)
Change package name in AndroidManifest.xml
Build an sign the application.
What exactly is causing a problem?
when ever you change package name to Refactor but in R file will not package name so and android market consider R file package name.
Change package name in AndroidManifest.xml file now R package name will automatic change. now change old src package name new one. make sure activity is proper mapping.
What is bothering you? Just go ahead and release it with different package names. Make sure you make suitable refactoring in the code as well.

Package conflict while publishing similar apps

I need to publish two applications in android market which are similar in functionality and uses similar code base. The only places where these apps differ is client specific icons and some strings.
When trying to publish, it looks like my apps are getting package conflict. What should I do to avoid package conflict. I did some search on net and it looks like I have to change base package of my classes which just sounds weird. Is there any other option that I am missing.
The app is identified by the package name. Therefor the package name needs to be unique. Thats why everybody uses some domain names for that to create a unique package (domains are unique, too).
My packages looks like:
org.shufflecity.android;
org.shufflecity.server;
You can also add a subpackage for each client you have:
org.shufflecity.clientname.android
That should do the trick...
Only thing you need to change as package attribute in your manifest:
<manifest package="com.example.project" . . . >
Don't forget to fix all your staff in manifest file according to the new package name.
The package name HAS to be unique on the market. That said, you can still reuse the code you produce simply by making the common code an Android Library. Then each client subproject would have a different manifest specifying different package names.
Don't forget to create that package and to specify absolute package names for your activities in the manifest.

Categories

Resources