最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to rename all pakage name in one step in android studio? - Stack Overflow

programmeradmin3浏览0评论

For example, I want to rename test.zan.music to my.app.fun:

When I was working with Android Studio before:

1-Right click on the package name

2-Refactor

3-Rename

4-In this field I could rename the entire package name at once and in one step, but unfortunately recently only the last part of the package name appears (I don't want to change the package name separately)

How to rename all pakage name in one step in android studio?

For example, I want to rename test.zan.music to my.app.fun:

When I was working with Android Studio before:

1-Right click on the package name

2-Refactor

3-Rename

4-In this field I could rename the entire package name at once and in one step, but unfortunately recently only the last part of the package name appears (I don't want to change the package name separately)

How to rename all pakage name in one step in android studio?

Share Improve this question edited Feb 16 at 13:57 Shahin Sadeghi asked Feb 14 at 13:35 Shahin SadeghiShahin Sadeghi 519 bronze badges 1
  • i think this video very helpful to you. link: youtu.be/Jl4RDYNTJBc?si=cMS7HMKZkcVWZF4n – Meet Commented Feb 19 at 15:42
Add a comment  | 

1 Answer 1

Reset to default 1

Steps to rename your package in one go:

  1. Refactor Directories: Right-click on the package → RefactorRename → Choose to rename all directories.

  2. Update Gradle File: Open app/build.gradle and update both the namespace (in android) and the applicationId (in defaultConfig).

  3. Check Manifest: Ensure the package attribute (if specified) in AndroidManifest.xml reflects the new package name.

  4. Clean & Rebuild: Clean the project and rebuild to apply all changes.

If that didn't work, check this detailed solution on StackOverflow.

发布评论

评论列表(0)

  1. 暂无评论