The problem of not installing application on google play - android

When I uploaded it to google play, I got a com.example error, and then I typed another name instead of example and fixed all the places. I also corrected the package name in the google service json file. But it does not receive an error but when I run the application I get a "myappname" is stopped error. I have no idea what the problem is. What could it be? Where did the missing or wrong?
places where I make correction;
package names in all activity and fragments
googleservice.json file
package name in manifest
What is the problem?

You need to update in your build.gradle file like this
android {
applicationId "your.new.domain"
}
And then, Sync the project.

Related

Unable to create preview of the app actions used in the app in google assistant

I have added the shortcuts.xml in res/xml and also added the
<meta-data
android:name="android.app.shortcuts"
android:resource="#xml/shortcuts" />
in the AndroidManifest.xml and also uploaded the signed bundle file in the play console internal testing.
But I'm getting the below error while creating the preview using the google assistant app actions test tool in android studio
Google Assistant plugin v2.3.0
Preview Creation Error
Status Code: 400
Message: Precondition check failed.
- Please sign in to Play Console (https://play.google.com/apps/publish) and check if you have accepted the latest Terms of Service (ToS), and the Gmail/G-Suite account has the authorization to modify the app with package name 'uninitialized.application.id'.
The part of the error message that reads
modify the app with package name 'uninitialized.application.id'
seems particularly strange. There are a few things I would make sure about:
Make sure your app/build.gradle has the correct applicationId in the defaultConfig section and that you use this Id elsewhere.
Make sure that was the version that you uploaded.
Ensure that the account that you used for the play store is the same account that you're using to for the test tool.
This issue suggests that a default applicationId may have been assigned and set in the merged manifest, and that you can just rebuild the entire project once you have it correctly set in app/build.gradle

App on Play store. Changed package name in Java. What part of Manifest needs old package name?

I released an app on Play store a few years ago.
The package name was com.X.Y.appName
This week, I found the old source code and got it all working in Android Studio 14.
I did not like the package name for my Java code to be com.X.Y.appName
So, I changed the Java code to com.Z.appName
The Java code was fine with that, and everything runs fine in the emulator testing.
However, I now want to release the new version in the Play store.
So, how do I release this new project that is recoded as package com.Z.appName to be released as an update to com.X.Y.appName ?
The manifest.xml file references the package twice
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Z.appName">
and
<activity android:name="com.Z.appName.MainActivity">
Which of these needs to remain in the original package name to keep this App release to be considered an update, and not a brand new app ?
I tried to revert the first package name under the manifest tag back to com.X.Y.appName, and my code would no longer compile. I am now getting "error: package R does not exist". So, I put it back to com.Z.appName.
If I change the 2nd one in the activity tag, the code turns red, and I get "Class not found" error.
So, how do I release this new project that is recoded as package com.Z.appName to be released as an update to com.X.Y.appName ?
Do I leave the 2 entries above in manifest.XML to retain the new package name of com.Z.appName, but revert to the original com.X.Y.appName somewhere else entirely?
Build. Gradle?
I think I found a way. Does this seem correct?
I changed the manifest to the original package name
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.X.Y.appName">
Then I added this in MainActivity.java
import com.X.Y.appName.R;
The project now compiles and works, and the manifest has the old project name.
Do I need to edit build.gradle as well ?
Currently, it shows the new package name
defaultConfig {
applicationId "com.Z.appName"

Change Spotify apk name

I'm trying to change the name of the apk of spotify, but show me many dependencies to make this...
First I follow this manual: Change Package Names of APKs
On the first step, I found on
in manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.spotify.music" platformBuildVersionCode="24" platformBuildVersionName="7.0">
I modified by com.spotify.jair
On smali I modified the name of the folder smali/com/spotify/music
to Smali/com/spotify/jair
Search Lcom/spotify/music and replace
with Lcom/spotify/jair inside smali folder
After that, when I tried to install and the error:
Failure [INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.spotify.jair attemptin
g to redeclare permission com.spotify.music.permission.SECURED_BROADCAST already
owned by com.spotify.music]
I modified all the com.spotify.music, inside AndroidManifest.xml to com.spotify.jair and the error is:
Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Package couldn't be installed in /
data/app/com.spotify.jair-1: Can't install because provider name com.spotify.mob
ile.android.mediaapi (in package com.spotify.jair) is already used by com.spotif
y.music]
So inside: res\values\ I found <string name="media_provider_authority">com.spotify.mobile.android.mediaapi</string> I modified: <string name="media_provider_authority">com.spotify.mobile.android.mediaapis</string>
And the error is:
6280 KB/s (35226422 bytes in 5.477s) Success
But the app does not open, and close inspected. Can anybody help me on the debug why the app is closing, Is there are a tool to debug why the app is closing?
Thanks!
Also to add this project tree:
Project Tree
I can't comment, the app is crashing, you need to take a logcat to see why
adb logcat > l0g.txt
Open Spotify
Unplug phone
And then upload that to paste bin

Can Android certificates get corrupted? I am unable to upload new Play Store App update

I inherited an android app that was initially outsourced to an external developer, fixed stuff and I am now ready to send the new update to the play store.
Then I found out that I need a specific signing key in order to update the app, which we got from the previous developer.
So I generated a signed release apk using the key I got and tried to upload. Upon uploading, I get a pop-up with an error. see screenshot for details
We asked the developer if he was sure that was the key he used, and he swears he looked everywhere and its the only key he used. Although, I do think he might have changed the password for it..., not really sure.
Significant changes I introduced to the app is changing the package in manifest and creating product flavours which each their own package name(one of them got to keep the original package name from the play store).
Some things I noticed: When I got the app, the app manifest had an out-commented package name and a new one with our company's name in it. The original one had the name of the of the outsourcing company in place of the "example" of the "com.example.appname" bit, so they must have changed the package name when they created the release apk.
I have no idea if any of this means anything because the package name is the same when I put it all in an apk... It's just that the store claims that the app was signed with a different certificate and the previous developer swears he used the same he sent to us.
Can anyone tell me if it's possible to do anything to make this work, or are we completely doomed and will have to upload a new app to the store?
Thanks for any help.
Update:
Because people are asking about packagename, let me clarify.
When I got the app, all the packagenames in the manifest was not the same as the one from Playstore... so i refactored the entire package app-wide to reflect the play-store package name... and then I introduced product flavours because we need a new app with different branding that is similar to the original one... so I ended with with a structure like this:
defaultConfig {
applicationId "PlayStorePackagName"
}
productFlavors {
brand1 {
applicationId "PlayStorePackagName" //<- for original app
}
new_brand{
applicationId "NewPlayStorePackagName" //<- for new app.
}
}
In this case, it shouldn't matter what package name is in the manifest, should it?
You cannot change the package name nor the Certificate for the App for the Playstore! If you don't have the correct certificate you cannot submit your App as an update to the existing one.
Certificate checking
However you can check the information stored in your available Keystore and compare it with the current store apk. For Example:
jarsigner -verify -verbose -certs yourapp.apk
You can get more details with the keytool. See this Thread for more information.
Package name
You can check the correct package name for your app when Browsing to your App in the play store.
Example for Google Plus: https://play.google.com/store/apps/details?id=com.google.android.apps.plus
id=com.google.android.apps.plus is the package name in this case. This cannot be changed for your App
However this package name is defined by your applicationId within your App. Your structure of your app can have different package names. See here for more information.
From the docs:
When you're ready to make changes to your APK, make sure to update your app’s Version Code as well so that existing users will receive your update.
Use the following checklist to make sure your new APK is ready to update your existing users:
The Package Name of the updated APK needs to be the same as the current version.
The Version Code needs to be greater than that current version. Learn more about versioning your applications.
The updated APK needs to be signed with the same signature as the current version.
To verify that your APK is using the same certification as the previous version, you can run the following command on both APKs and compare the results:
$ jarsigner -verify -verbose -certs my_application.apk
If the results are identical, you’re using the same key and are ready to continue. If the results are different, you will need to re-sign the APK with the correct key.
You say that:
Significant changes I introduced to the app is changing the package in manifest
So this is the source of issue. You'll need to use the same package name.

Changing Package name for an application

I need to deploy two application on the play store :
Eg:
com.android.myapppro and com.android.myappfree both have similar code but small changes like [Show/Hide Ads]
So while changing the package name of the application updating the Gradle file
applicationId "com.android.myapppro"
To
applicationId "com.android.myappfree"
is sufficient, or do i need to update the AndroidManifest.xml also.
Changing the AndroidManifest.xml will force me to update the R imports in all the classes.
Please Help!
Thanks in advance.
From ApplicationId versus PackageName
Therefore, we have decoupled the two usages of package name:
The final package that is used in your built .apk's manifest, and is the package your app is known as on your device and in the Google Play
store, is the "application id".
The package that is used in your source code to refer to your R class, and to resolve any relative activity/service registrations,
continues to be called the "package".
You need to change only applicaitonId and left AndroidManifest.xml as is.

Categories

Resources