problem while uploading apk on play store - android

When I upload my apk on the playStore(release in alpha), I am getting this error:
Upload failed
You need to use a different package name because
[name of package] is used by a pre-installed
application. To upload a pre-installed application, please contact
Google Play Developer Support. Learn more.
However, it is my first release and no one is using this package name.
Last thing, the version code is 1531. Maybe is it due to that? FOr the first release, I have to set it to 1?

There exists other application with the same package name for sure.
You can refactor-rename your package name, and make it sure that changes reflect in a manifest file, Proguard configuration etc.

Copy your Package name in the Manifest file
<package="com.example.myapplication"> Press ctrl+shift+R enter your old package name and replace with a new one.

Your application is having the same named package, which is already used by some other app on play store.
The solution is to change the package name using refactoring. It will change your package name.

Related

Google playstore does not identify the new package name?

I created an app using Android Studio. And linked firebase as backend. While publishing on play store google informs me that there is another app with the same package name. So I go back and change the package name in and AndroidManifest file and rebuild the apk. On uploading, the apk google still says the same error with an old package name. I read somewhere that we have to change the applicationId in a build.gradle file also, but this id is used by firebase to identify the app. Hence I can't do this , so how to solve this problem?
If I'm not wrong, you should create a new application in your developer google console to upload your application with the new package name. You can't modify a package name after upload an application:
Things That Cannot Change:
The most obvious and visible of these is the “manifest package name,”
the unique name you give to your application in its
AndroidManifest.xml. The name uses a Java-language-style naming
convention, with Internet domain ownership helping to avoid name
collisions. For example, since Google owns the domain “google.com”,
the manifest package names of all of our applications should start
with “com.google.” It’s important for developers to follow this
convention in order to avoid conflicts with other developers.
Once you publish your application under its manifest package name,
this is the unique identity of the application forever more. Switching
to a different name results in an entirely new application, one that
can’t be installed as an update to the existing application.
You need to change applicationId with same package name in build.gradle file.
In android studio applicationId is considered as package name for play store. so change applicationId to change package name. It will help you.

Refactor/rename steps to fix ""com.google" is restricted"" error

When I attempt to upload my apk then everytime I get the following error:
"Upload error
UPLOAD NEW APK TO PRODUCTION
Upload failed
You need to use a different package name because "com.google" is restricted."
When I rename or refactor based on the multiple different steps suggested on this site to change "com.google.samples.apps.myapp" it breaks the program in a manner which then prevents it from a successful "build"
I have read and reread: "com.example restricted" Google Play error; even when changing the package name AND also
Android Studio Rename Package
I suspect that the refactor does not correct the links I need to the R file? Any help would be appreciated.
If you're using Android Studio / Gradle you don't need to change your package name (as it impacts your resources) but only the "applicationId" which is whats used for publishing.
Details here: http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename

I get the package name already used error when uploading android app

When uploading the android app in Google Play, I got the error saying that the package name is already used. Instead of changing the package name everytime I upload the updated app, what are the other ways?
That tells you that another app with the same package name already exists. You have to change the package name in your java files, the Manifest / the Gradle file depending on the build type you use.
You cannot have another application with the same package name on the PlayStore, so there is no other way than changing the package name permanently.

Google play says: "You need to use a different package name" - why?

I have already published an app called com.mycompany.mygame on google play.
I then decided to publish an ad free version of it. I did not change the package name in eclipse because I noticed that in the "export" process you have the opportunity to have the final apk set as anything you like. So I set it there as com.mycompany.mygameaf - note the additional "af" on the end. But then when tried to upload it to the market, google said:
You need to use a different package name because "com.mycompany.mygame" is already used by one of your other applications
So now I'm confused. Is the complaint because I'm not allowed to have an apk that is a name which is and extension of a previous app? Or does the final apk somehow have knowledge of what the original name was?
What is the easiest way to resolve this?
Apart from correcting app name in the Manifest I also had to change applicationId in the app's gradle.build file.
defaultConfig {
applicationId "com.example.changednameofmyapp"
...
}
Also, if you're using ProGuard, do not forget to change appropriate rules in your proguard-rules.pro
Just search the old package name in the whole project and change it.
Regardless of the name of the .apk file, the package name of the Application contents inside it must be unique.
You can use refactor-rename to change this, though make sure that the change penetrates to the manifest file, proguard configuration, etc.
The name of the APK doesn't matter, its the package name within the AndroidManifest file that counts.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourcompany.yourapp"
There can only be one app on the market with that package name so in order to publish your ad free version you would have to change the package name in the manifest file, e.g. add the af onto the end of the package name within your manifest.
As mentioned in other answers, you're development would be simpler if you put all the shared code and assets a common library project that is a dependency of your paid and free versions.
You may also wish to play with the new Gradle build system (in Android Studio) which allows you to dynamically set things like the package name at runtime. It also allows you to switch resources during build time, which is extremely convenient; You could have a boolean resource that represents whether the current app is the paid version. This allows you to enable/disable app features based on a check to that value.
The filename of the APK is irrelevant, the package name of your app is used as a unique identifier - it is in the root element in the AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.packagename"
android:versionCode="1"
android:versionName="1.0" >
When you initially create your project in Eclipse it creates an actual package structure which matches this package name for you to put your source files in.
You can actually chnage your package name by modifiying this manifest value and you can just keep the folder/package structure as is - it does not need to match your actual application package name.
Alternatively, right click your project in Eclipse, go to "Android Tools" and then select "Rename Application Package"
After you do this you should be able to submit your binary
The package name in the manifest is used to identify the application within Android and within Google Play. So different apps need different names.
The easiest workaround might be to just create a new package, with no code in it, and use that as the app's package name in the manifest.
What I've done to solve my many-apps-from-one-codebase problem is put all the apps' code in a library project, and then I have several app projects that use that library. The app projects contain no code, just a manifest and custom resources.

Android App Publishing Upgrade: Same Key But Dev Console disagrees!

I am trying to publish an upgrade to my app in Android Market. I am using the same key and alias as before (I have only one key and a single alias). But I get the error "The apk must be signed with the same certificates as the previous version.". This is not the first time I am uploading upgrades. Never had problems before.
The only difference I have this time is I added a new sub-package to the project. My base package is "in.vasanth.android.droidsave". I added a package "in.vasanth.android.droidsave.db". Does adding a package affect the upgrade? Or did I some how mess up my key?
Make sure that you are uploading an exported .apk file, not the one that is normally built in the project's bin directory. Adding a sub-package won't affect anything as long as you haven't changed the package name for the overall application in the manifest file.

Categories

Resources