step
- com.oldname右键 -> refactor -> rename to newname
- edit AndroidManifest and change “com.oldname” to “com.newname” as well. (Important cause that’s why we cannot import R)
- project structure -> app -> flavors -> change “application ID” to “com.newname”
link
https://stackoverflow.com/questions/12986301/package-r-does-not-exist/29986110