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

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

Related

How to have debug, beta and prod builds installed at the same time

i'm trying this tutorial but in the step 2, i got this error message:
No matching client found for package name 'com.cinephile.good.beta'
I thinks the Android Studio automaticly make the package so, i just trying using invalidate, and still got same message.
I hope someone can teach me how to handle this error, thank you.
You have to add "com.cinephile.good.beta" as app in Firebase Project as different app in same project and download a json file again and put into beta product flavour it will work.

problem while uploading apk on play store

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.

Creating a debug app

Okay so i have an application, put up on the playstore.
What i want now, it to create the same application but with debug postfix in the name and it must have everything same.
I want to do this, because i do not want to disturb my original project when i am experimenting stuff,
So what i did was, i copied the project folder from wherever it was to the desktop, original one had the package name com.femindharamshi.spa so i refactored the whole thing to com.femindharamshidebug.spadebug and all changed the app_name in string
but when i try to open this app in the emulator, Android Studio Gives me the following error :
Installation failed with message Failed to finalize session :
INSTALL_FAILED_INVALID_APK: Split_lib_slice_4_apk was defined multiple
times. It is possible that this issue is resolved by uninstalling an
existing version of the apk, if it is present, and then re-installing
Also i do not want to uninstall the original app from the emulator/physical device, i just want to add this app for testing purposes. What should i do ?
Try closing the Android Studio and giving clean and build to the project.
change you application ID in app level build.gradle file and sync the project
applicationId "//pkg id here"

open a new version with the same package name android studio

I would like to add code to my app but I would like to do that on a new version in case so that i can always get back to my older version which worked.
I need the package name to be the same cause i'm using google services like :JSON and firebase which are relies on the package name.
Could someone please advise step by step?
when I tried to open a new project and copy the files to that new project got warnings like INSTALL_FAILED_INVALID_APK and Gridle not imported. for example:
"Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: Split lib_slice_2_apk was defined multiple times.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?"

can't sign android app lite version with same private key

i just signed my paid app and now i want to sign a lite version of it with the same private key. my problem now is that, am receiving this error:
jarsigner: unable to open jar file.
do i have to create another keystore for it? or is the problem coming from the fact that i am saving it as a different file name? what can i do? Thank you
The problem is definitely not related to the fact that it is a lite version. I find it curious that the error message is Jarsigner: Unable to open jar file.
Some searching around leads me to believe you are making some typing error in your command (please revisit the steps found here http://developer.android.com/guide/publishing/app-signing.html#signapp )
Also some other searching I did pointed to difficulties someone had with certain file names. Is your .APK name elaborate? Another instance of this problem I found ( http://coding.derkeiler.com/Archive/Java/comp.lang.java.help/2005-09/msg01002.html ) was claimed to be solved by simplifying the name.
Also make sure you are actually pointing to the .APK. Try typing out full paths to the file if you're not already.
I see an issue where i was using the full paths and it did not work, if you are having this problem, then just ensure that the .apk and the .keystore file is in the same destination. For my scenario I moved the apk to the root folder and run command and it worked. Hope this helps.

Categories

Resources