Change "with.example" from an android app

Asked

Viewed 2,173 times

3

I am trying to put an application in the Playstore, but the following error appears: "You have to use a different package name because "com.example" is restricted."

The thing is, I’ve already changed the package name and it’s still the same mistake.

Here’s a print of the code: inserir a descrição da imagem aqui

Initially the package had the name "with.example..." and I changed it to "test.example..". And I re-named the whole code. But in the image, in line 3, the change did not happen and if you change manually, starts to give error in the code. How can I fix this situation?

  • I think the problem is in the folder gen, because there is a package with that name and does not let change to another, IE, if you change the name it generates a new package with the old name

2 answers

1

You need to change the "package" in the Manifest.

If you are in Eclipse I recommend to do the following:

  1. Right-click on the project
  2. Android Tools
  3. Rename Application Package

0


I solved the problem as follows:

  1. I opened a file with Notepad++
  2. I have searched all files by "com.example" and replaced by another name
  3. I saved changes and it worked
  • In fact, you wouldn’t even have to rename everything, just change or insert the application ID into Androidmanifest.xml because it is considered when checking on . apk.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.