How to change package name in android studio project

I tried change package name in two file is AndroidManifest.xml and build.gradle but not success, project build success but failed when installing. Can anyone help me, thank all.

maybe above can help you

thank for your suggest but that solution seem only work with eclipse project