{"id":1034,"date":"2015-06-16T23:07:45","date_gmt":"2015-06-16T23:07:45","guid":{"rendered":"http:\/\/www.advancedwebhelp.com\/blog\/?p=1034"},"modified":"2015-06-16T23:20:44","modified_gmt":"2015-06-16T23:20:44","slug":"renaming-android-package","status":"publish","type":"post","link":"https:\/\/www.advancedwebhelp.com\/blog\/2015\/renaming-android-package","title":{"rendered":"Renaming Android Package"},"content":{"rendered":"<p>From time to time you may find you need to rename an android package while developing in Android Studio.    There seem to be several explanations around the web.   The following method seems to be the method that worked the first time everytime for me.  Example, change package com.example.test to com.example.testing:<\/p>\n<ol>\n<li>Click <b>Project<\/b> in the left sections bar &rarr; the Project Pane will open.<\/li>\n<li>Select <b>Java<\/b> under src \/ main  of the app with the package to be renamed.<\/li>\n<li>Click the <b>Small Gear<\/b> on Project Pane top action bar &rarr; an options menu will appear.<\/li>\n<li>Uncheck the <b>Compact Empty Meddle Packages<\/b> in the options menu &rarr; the directories under java will cascade down.<\/li>\n<li>Select the package name to change (ex: <b>test<\/b>) and right click &rarr; a dropdown menu will appear.<\/li>\n<li>In the dropdown menu, select Refactor \/ <b>Rename<\/b> &rarr; a window will appear<\/li>\n<li>In popup window, select <b>Rename package<\/b> &rarr; a window will appear<\/li>\n<li>Enter the new package name, click <b>search in comments &#038; strings<\/b> and <b>search for text occurances<\/b><\/li>\n<li>Press <b>Refactor<\/b><\/li>\n<\/ol>\n<p>Refactoring should replace all needed directory names, and references within your files, producing a new package.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From time to time you may find you need to rename an android package while developing in Android Studio. There seem to be several explanations around the web. The following method seems to be the method that worked the first time everytime for me. Example, change package com.example.test to com.example.testing: Click Project in the left [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-1034","post","type-post","status-publish","format-standard","hentry","category-android"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts\/1034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/comments?post=1034"}],"version-history":[{"count":2,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts\/1034\/revisions"}],"predecessor-version":[{"id":1038,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts\/1034\/revisions\/1038"}],"wp:attachment":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/media?parent=1034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/categories?post=1034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/tags?post=1034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}