Android:如何在 Android Studio 中更改生成的 apk 文件的特定名称? [英] Android: How to change specific name of the generated apk file in Android Studio?

查看:51
本文介绍了Android:如何在 Android Studio 中更改生成的 apk 文件的特定名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,IDE 会生成一个类似于 app-debug.apkapp-release.apk 文件的 apk,但我需要生成 Apk 的特定名称 应用程序.

例如:我的应用程序名称是 iPlanter,所以我需要生成 iPlanter-debug.apkiPlanter-release.apk 而不是 app-debug.apkapp-release.apk 分别.

谢谢,

解决方案

第一步:转到主项目root,在 app 下,右键单击 app 并将应用程序重构为特定名称(示例 iPlanter)并按确定

第 2 步:转到项目设置文件,即 setting.gradle 文件

setting.gradle 文件包含

include ':app'

现在需要用特定名称替换应用程序.

例如在 include ':app' 中由 iPlanter 替换应用程序它看起来像下面

include ':iPlanter'

然后同步项目,然后运行您的应用程序.最后,App 生成一个类似于 iPlanter-debug.apkiPlanter-release.apk 文件的 apk.>

By default IDE genarate a apk like app-debug.apk or app-release.apk file but I need to generate specific name of the Apk of the App.

For Example: My application name is iPlanter so i need to generate iPlanter-debug.apk or iPlanter-release.apk instead of app-debug.apk or app-release.apk respectively.

Thanks,

解决方案

Step 1: Go to root of the main project, under app , right click on app and refactor the app into specific name (example iPlanter) and press ok

Step 2: Go to Project Setting file which is setting.gradle file

setting.gradle file contains

include ':app'

Now need to replace app by specific name.

For Example app replace by iPlanter in include ':app' it looks like below

include ':iPlanter'

then Sync project, after that run your application. Finally, App generate an apk like iPlanter-debug.apk or iPlanter-release.apk file.

这篇关于Android:如何在 Android Studio 中更改生成的 apk 文件的特定名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆