Renaming Android package name using Android Studio

后端 未结 4 938
孤街浪徒
孤街浪徒 2020-12-17 21:30

I Was Created an android application with package name of com.example.******.sample . I need to refactor the package name into org.newOrg.*******.sa

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-17 22:09

    In Android Studio, you can do this by following these 4 steps:

    1) Click on the little gear icon on Project Pane

    2) Uncheck the Compact Empty Middle Packages option

    3) Now you can rename each package by right-click & then refactor it, remember to select Rename Package on popup rather Rename Directory

    4) Update the package in build.gradle

    5) And update google-services.json is you are using it (i.e. FireBase).

提交回复
热议问题