Liggliluff
Liggliluff

Reputation: 756

Manually changed package names causes ProcessException

I lost the Google Play Keystore (of only Android Studio file browser put removed file into the Recycle Bin rather than removing them completely)... so I tried to upload the app as a new app. But first I must change the package names.

I search (find path) for all instances of the full package name, and replaced all with the new package name. I've also used Rebuild Project and Clear Project several times.

Issues that appeared now are:

Cannot resolve symbol 'R'

And if I try to run or generate an APK, the following error is thrown:

Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Program Files\Android\sdk\build-tools\20.0.0\aapt.exe'' finished with non-zero exit value 1

Every instance of old.package.name is changed to new.package.name, including folders (main/java/) and AndroidManifest.xml

If someone has experience this before and maybe have ideas to solve it.
I can also provide more information when needed.

Upvotes: 1

Views: 65

Answers (1)

Anindya Dutta
Anindya Dutta

Reputation: 1982

This is because even though you have changed the package name, the package name in gen is still the old one. Just use an import statement in your class and import the old package name.R.

Upvotes: 1

Related Questions