0

I want to upload my app to Google play store. After uploading the signed aab file in play console, I got this error:

You need to use a different package name because "com.example" is restricted.

So, I went to my android studio project and renamed my package. Now I constantly keep on getting the error:

error: package R does not exist

I changed the package name in my manifest file, and also tried cleaning and rebuilding the project. But it's not working. How do I resolve this issue?

Error

If I use com.example.electric_viewing.R then it works. Why?

  • How did you change package name? You need to go in project view and then change package name from there so your error will resolve. – sajidjuneja Dec 31 '22 at 13:13
  • Yes I right clicked on package name and pressed `Refactor`, it changed the package name in all the files. –  Dec 31 '22 at 13:16
  • And build.gradle? – sajidjuneja Dec 31 '22 at 13:22
  • Yes, I changed there too. I even tried `invalidate cache and restart` but that too doesn't work –  Dec 31 '22 at 13:26
  • Have a look at this https://stackoverflow.com/questions/22275855/package-r-does-not-exist-error-when-building-with-gradle-from-command-line – sajidjuneja Dec 31 '22 at 13:35

0 Answers0