Uploading Apps to the Play Store - android

So I messed up pretty hard and forgot my password key store password so I ended up having to make a new application and keystore. But when I tried uploading the new apk file it said I couldn't do that because I already had an application with the same package name. So what I'm wondering is is there any easy fix to this? Can I just change the applicationid in the gradle file?
EDIT: Surprisingly enough just changing the applicationid and resyncing it worked! Thanks for the help though.

You have to provide a unique packageName, which is defined in your AndroidManifest.xml.

Your best (and fastest) solution is to use the Refactor > Rename option - within Android Studio/Eclipse IDE's - to change your project package structure to something (slightly) different.
By doing this, the IDE should take care of changes to your AndroidManifest.xml file as well.
Good Luck!!!
On Android Studio:
On Eclipse:

you must need to change the main package name of your application which must be unique . unique means with same name no any application is uploaded on playstore then only your issue will get resolve
see your problem is you forgot password of your keystore certificate see why that certificate is uses in android is to update the application every time you need to pass password to that file but unfortunately you forgot it so you have no choice other than changing pakcage name also your application will consider as a new application on playstore your previous application and this current one will be seprate application

Related

Change Manifest file using code?

I am working on app where I required to change manifest file.
I saw long before to change package name at time of sign apk, but not able to find that also.
so is there any way to change Version Code, Package Name and Pnermission using code..
As said here the possible changes at runtime are very limited. At least for standard no-root-required software (Not sure though if root privileges really help for that matter). It's hard to guess what you're trying to accomplish but after all the manifest was made to fix such things as version code, package name and permissions before your app is compiled.
So please correct me if I'm wrong, but I think what you are trying to do is not possible.

how to install two instances by one apk?

I developed an app for android, but I need to install two instances of it, one for my daily use, another for debug/development, I don't have too many phones for debug, just have one phone, and don't want to debug on emulator, because it's too slow compare to real phone.
Or is there any thing we can change on APK file, then we can install it as another app, e.g. change it's package name ?
Currently, I changed the package name in code then make them to two apps, which can be installed on the same phone, but this way is not convenient. seek for simple way.
Update: is there any tool to modify package name in androidmanifest.xml directly after packaged(apk file)? then we just need unzip the apk, modify the androidmanifest.xml, zip the apk again.
You've answered the question yourself. You have to change the package name in the manifest, otherwise Android will override the old app (or can't install it, if the certificate differs).
Try changing the the name of the app in strings.xml from resource folder #string/app_name to have multiple instances of the same app. And package name must be changed so that the existing app is not overridden.
You can copy your project and change the package name in the copy.
You can use the same SVN path to apply the changes on the two projects.
Or you could automate the different builds using an ANT build.xml file with parameters. There are several examples on how to do this for Android in Google.
ref: One android application, one startup view, two icons
I would make the original app a library project and create a new project which uses the library project.
Advantage:
you can have both running as your new project should have a different package name
easily identification by overriding the app name in your new project (just add "beta" to it)
both versions can be installed on one device/emulator parallel
pretty good setup if you try to verify the update process of your app
no confusion with a version control system - renaming packages results in awful non-real changes on your development branches
Disadvantage:
you need to "uncheck" the library setting before you can release the original project
you might need to change some stuff in both manifest files which will increase the maintainability in a small manner
If you really need a market version of your app on your device, this method is the easiest one as a package rename will very probably result in worse maintainability.
edit:
You can mark a project as a library project in project preferences -> Android. After that you can link add that library project to another normal android project at the same spot, just click on the add button.

How to have different versions of an android project on the device?

I need to have different versions of my code on my device when I'm developing my android application. I want to have a copy of my latest code once in a week or so. The reason is that sometimes you make changes to the code and make it worse for a while, then after that you polish your code to include the features. So I need to have a copy of latest correctly running version of my code on the device.
I tried to change the app name, to see whether the ide deploys a new copy of my code, but it didn't work and the ide seems to be smarter than that and it replaces the app with the new name. I suspect that I need to change the package which is a little bit frustrating/risky. Anyone knows the solution?
Right now, I'm using Intellij to implement my android project but I think this doesn't matter.
You need to change the package name.
I use ant build script to do this easily. I created an ant task to rename the package name and make a build.
Typically I use svn to keep track of changes and label which ones are the ones that work then add features and use svn merge commands to combine new features with working code. Then if you want to undo something you can just roll back a revision.
The way I achieved that goal is:
- configure the original project as library
- create another project specifying a different package name in the manifest
- you also need to declare all the activities, receivers, etc with the full name in the new manifest
In that way switching the code of the original project through different branches you can create different apks and have different version of the app installed at the same on your device.
You need to change the package name, not the app name, it's pretty easy in Eclipse.
If your package name now is 'com.sina.perch', so just rename it to 'com.sina.perch1' or something else whatever in file 'AndroidManifest.xml' , which looks like:
It will be work.

non standard package name - will it cause trouble?

I have rather stupidly published a game on the android market with a package name of mick.game.tangletwister, whereas I should have called it com.rai.tangletwister (where rai is the name of my company)... it all seems to work fine - but could it cause some trouble in the future - should I change it? And if I do change it, will it cause problems for existing users that grab the updated version?
It will be fine if you keep the existing package name. Nothing wrong with that. The TLD.company.appname format is just a convention. As long as you don't enter some special characters in your packagename (which you did not), it will work anyway.
But if you try to change it you will run into trouble. See Things That Cannot Change.
If you change the package, update notification will not work any more. Moreover, when a user with the old package name installs the updated game, he/she will have both installed, because the update will replace the old version only if package/class are the same.
Depending on how many installs you have, you can, of course, remove the existing app from the Market - this should force-remove it from devices where it's installed. Then you create another app (same metadata, naturally) and use a correct package name.
1) Change the package name
2) Create a new app in the android market with that new package name
3) Update the old app, and add a pop-up saying that users should install a new version. Possible with a link to the new app
4) After some months, you should remove the old app.
Like user287351 said, it is possible to keep using the current package name, but i would prefer to have it listed under the correct package name

How to install an app I write twice?

I need to have both earlier and later versions of App I write in Eclipse.
What do I need to change (activity name?) to upload new version of the app to my phone without overwriting the old one? Any fast way to do it?
The package name in the manifest identifies the application (see here). So you also need to change the package name.
Change the app name in your manifest file.

Categories

Resources