2
I need to change the domain of my android project.
Example:
When I created the project I placed a fictional domain: br.com.dominio-x
Then when the project evolved, I registered a valid domain: br.com.dominio-y
I need to make this change and I don’t know what the most recommended procedure is.
Obs: I found several procedures on the internet, such as: use Refactor, Change Gradle, do both or only one. Anyway several examples.
I would like to know which is the most recommended way because the application is working properly.
Change in Graddle and Androidmanifest, it is not necessary to change in the manifest, but if you want to leave everything neat hehe changes in the manifest tmb..
– Dev
See: https://stackoverflow.com/a/29092698/2570426
– viana
@Matheus "it is not necessary to change the manifest," that is not true, see https://developer.android.com/studio/build/application-id.html#change_the_package_name. There it is said the following: "However, if you want to change your package name, be Aware that the package name (as defined by your project directory Structure) should Always match the package attribute in the Androidmanifest.xml file"
– ramaral
@ramaral in the company where I work, I had to unify all the application code to generate other applications, and to do this I just change the grandle id.
– Dev
@Matheus I believe, just mentioned what is said in the documentation. I withdraw the part " that is not true".
– ramaral
@ramaral haha that this, maybe I am wrong too kk if it is we will find out in a while when the bombs explode =)
– Dev
@Matheus See the last paragraph with the title "One more Thing to know:". Maybe that’s why you’re right. Anyway the documentation is ambiguous (something I already know but sometimes forget).
– ramaral
@quiet ramaral I’ll take a look yes, I appreciate.
– Dev
Another aspect that should be taken into account is what is said in the first paragraph regarding the amendment of
applicationId
in the build.Gradle: "... Once you Publish your app, you should Never change the application ID."– ramaral