Android Studio修改packagename
来源:互联网 发布:怎样在淘宝上捡漏 编辑:程序博客网 时间:2024/06/05 21:13
546down vote
+400
In Android Studio, you can do this:
For example, if you want to change com.example.app
to my.awesome.game
, then:
In your Project pane, click on the little gear icon ( )
Uncheck / De-select the
Compact Empty Middle Packages
option
Your package directory will now be broken up in individual directories
Individually select each directory you want to rename, and:
- Right-click it
- Select
Refactor
- Click on
Rename
- In the Pop-up dialog, click on
Rename Package
instead of Rename Directory - Enter the new name and hit Refactor
- Allow a minute to let Android Studio update all changes
- Note: When renaming
com
in Android Studio, it might give a warning. In such case, select Rename All
- Now open your Gradle Build File (
build.gradle
- Usuallyapp
ormobile
). Update theapplicationId
to your new Package Name and Sync Gradle, if it hasn't already been updated automatically:
- Done! Anyways, Android Studio needs to make this process a little simpler.
546down vote
+400
In Android Studio, you can do this:
For example, if you want to change com.example.app
to my.awesome.game
, then:
In your Project pane, click on the little gear icon ( )
Uncheck / De-select the
Compact Empty Middle Packages
option
Your package directory will now be broken up in individual directories
Individually select each directory you want to rename, and:
- Right-click it
- Select
Refactor
- Click on
Rename
- In the Pop-up dialog, click on
Rename Package
instead of Rename Directory - Enter the new name and hit Refactor
- Allow a minute to let Android Studio update all changes
- Note: When renaming
com
in Android Studio, it might give a warning. In such case, select Rename All
- Now open your Gradle Build File (
build.gradle
- Usuallyapp
ormobile
). Update theapplicationId
to your new Package Name and Sync Gradle, if it hasn't already been updated automatically:
- Done! Anyways, Android Studio needs to make this process a little simpler.
0 0
- Android Studio修改packagename
- Android Studio 修改包名packageName
- 快速修改android packagename
- 在Android Studio中修改包名?ApplicationId 与 PackageName
- Android Studio-ApplicationId 与 PackageName
- Android studio里packagename和applicationId
- 使用Android studio开发中的packagename和applicationId
- Android ApplicationId 与 PackageName
- android ApplicationId 与 PackageName
- 修改packagename.client.dll.rsp
- AndroidStudio修改packagename(包名)
- android studio 工程中跟包名packageName相关的几个地方
- android build构建,获取packagename
- Android Studio 修改版本号
- Android Studio 修改字体大小
- Android studio 修改快捷键
- Android Studio常用修改
- 修改Android studio主题
- Java基础
- 基址重定位
- s:iterator 遍历list
- Qt组播(多播)总结
- Android学习笔记----Intent基本用法
- Android Studio修改packagename
- [LeetCode]Increasing Triplet Subsequence
- Xshell从windows与服务器之间的文件传送rz/sz
- 负载均衡—大型网站架构系列:负载均衡详解(上)
- android-USB-OTG 外部设备通讯 USB插拔检测
- Going deeper with convolutions-GoogLeNet(阅读)
- iOS经典面试题总结--内存管理
- 多节点任务框架设计之数据库设计解决方案
- 动画之旋转动画