{"id":1206,"date":"2017-04-28T07:10:40","date_gmt":"2017-04-28T07:10:40","guid":{"rendered":"http:\/\/abhiandroid.com\/androidstudio\/?p=1206"},"modified":"2018-06-05T07:11:18","modified_gmt":"2018-06-05T07:11:18","slug":"how-to-change-package-name-android-studio","status":"publish","type":"post","link":"https:\/\/abhiandroid.com\/androidstudio\/how-to-change-package-name-android-studio.html","title":{"rendered":"How To Change Package Name In Android Studio [Step By Step]"},"content":{"rendered":"<p>There might be many situations when you want to change package name of the App in Android Studio. You might have download source code from internet and wants to rename the package name according to your App details. Here in this tutorial I am going to discuss step by step how to rename\/change package name in Android Studio:<\/p>\n<hr \/>\n<h4><strong>How To Change Package Name In Android Studio [Step By Step]<\/strong><\/h4>\n<p><strong>Step 1:<\/strong> First make sure you are viewing the project in Android view. For that follow the below image to change from project to Android view in Android Studio:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1208\" src=\"\/androidstudio\/wp-content\/uploads\/2017\/04\/android-view-android-studio.jpg\" alt=\"android view android studio\" width=\"808\" height=\"179\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/android-view-android-studio.jpg 808w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/android-view-android-studio-300x66.jpg 300w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/android-view-android-studio-768x170.jpg 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Now click on setting gear icon and deselect Compact Empty Middle Package<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1209\" src=\"\/androidstudio\/wp-content\/uploads\/2017\/04\/Deselect-Compact-Empty-Middle-Package-android-studio.jpg\" alt=\"Deselect Compact Empty Middle Package android studio\" width=\"544\" height=\"223\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/Deselect-Compact-Empty-Middle-Package-android-studio.jpg 544w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/Deselect-Compact-Empty-Middle-Package-android-studio-300x123.jpg 300w\" sizes=\"auto, (max-width: 544px) 100vw, 544px\" \/><\/p>\n<p><strong>Step 3:<\/strong> Now you will see each package folder is broken into parts<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1210\" src=\"\/androidstudio\/wp-content\/uploads\/2017\/04\/package-folder-android-studio-split-broken.jpg\" alt=\"package folder android studio split broken\" width=\"385\" height=\"288\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/package-folder-android-studio-split-broken.jpg 385w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/package-folder-android-studio-split-broken-300x224.jpg 300w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><\/p>\n<p><strong>Step 4:<\/strong> Now right click on the first package folder, refactor and rename. Now a warning will be displayed but you go ahead and click Rename Package. After that enter your domain name for the package name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1211\" src=\"\/androidstudio\/wp-content\/uploads\/2017\/04\/refactor-package-folder-in-android-studio.jpg\" alt=\"refactor package folder in android studio\" width=\"818\" height=\"247\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/refactor-package-folder-in-android-studio.jpg 818w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/refactor-package-folder-in-android-studio-300x91.jpg 300w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/refactor-package-folder-in-android-studio-768x232.jpg 768w\" sizes=\"auto, (max-width: 818px) 100vw, 818px\" \/><\/p>\n<p><strong>Step 5:<\/strong> Now in the bottom of Android Studio it will display &#8216;Find Refactoring Preview&#8217;. Here click on &#8216;Do Refactor&#8217;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1212\" src=\"\/androidstudio\/wp-content\/uploads\/2017\/04\/Do-refactor-android-studio.jpg\" alt=\"Do refactor android studio\" width=\"772\" height=\"220\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/Do-refactor-android-studio.jpg 772w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/Do-refactor-android-studio-300x85.jpg 300w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/Do-refactor-android-studio-768x219.jpg 768w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/p>\n<p><strong>Step 6:<\/strong> Now it has change the package domain name of the App. Now go ahead, change the domain extension and App folder name according to your requirement:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1213\" src=\"\/androidstudio\/wp-content\/uploads\/2017\/04\/refactor-rename-domain-extension-app-name-android-studio.jpg\" alt=\"refactor rename domain extension app name android studio\" width=\"423\" height=\"238\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/refactor-rename-domain-extension-app-name-android-studio.jpg 423w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/refactor-rename-domain-extension-app-name-android-studio-300x169.jpg 300w\" sizes=\"auto, (max-width: 423px) 100vw, 423px\" \/><\/p>\n<p><strong>Step 7:<\/strong> Now open <strong>build.gradle (Module: app) in Gradle Scripts<\/strong>. Here change the application id and click Sync Now. Finally it&#8217;s done and you have successfully changed the App package name in Android Studio:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1214\" src=\"\/androidstudio\/wp-content\/uploads\/2017\/04\/build-gradle-sync-android-studio.jpg\" alt=\"build gradle sync android studio\" width=\"877\" height=\"335\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/build-gradle-sync-android-studio.jpg 877w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/build-gradle-sync-android-studio-300x115.jpg 300w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2017\/04\/build-gradle-sync-android-studio-768x293.jpg 768w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There might be many situations when you want to change package name of the App in Android Studio. You might have download source code from internet and wants to rename the package name according to your App details. Here in this tutorial I am going to discuss step by step how to rename\/change package name &hellip; <a href=\"https:\/\/abhiandroid.com\/androidstudio\/how-to-change-package-name-android-studio.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How To Change Package Name In Android Studio [Step By Step]<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,1,62],"tags":[],"class_list":["post-1206","post","type-post","status-publish","format-standard","hentry","category-android-studio","category-archieve","category-tips"],"psp_head":"<title>How To Change Package Name In Android Studio [Step By Step] \u2013 Abhi Android<\/title>\r\n<meta name=\"description\" content=\"There might be many situations when you want to change package name of the App in Android Studio. You might have download source code from internet and wants to rename the package name according to your App details.\" \/>\r\n<meta name=\"robots\" content=\"index,follow\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/abhiandroid.com\/androidstudio\/how-to-change-package-name-android-studio.html\" \/>\r\n","_links":{"self":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/1206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/comments?post=1206"}],"version-history":[{"count":1,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/1206\/revisions"}],"predecessor-version":[{"id":1448,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/1206\/revisions\/1448"}],"wp:attachment":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/media?parent=1206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/categories?post=1206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/tags?post=1206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}