为什么我的 APK 名称是通用的? [英] Why is my APK name generic?
问题描述
我确定这是当今最愚蠢的问题,但它是这样的......我有一个应用程序,我需要内部"分发以供贸易展上的销售人员使用.我使用 Android Studio(在 Windows 7 中)成功创建了一个自签名、zipaligned、发布的 apk 文件.输出文件的名称只是 app-release.apk.为什么我的应用程序名称没有像 MyApplication-release.apk 这样的输出文件作为前缀?我怀疑它与 Android Studio 中的文件夹结构有关,它是:MyApplication -> app -> src -> etc,等等.我尝试重构app"文件夹以匹配我的应用程序名称,但它给出了错误.我确定我遗漏了一些简单的东西.
I'm sure this is the dumb question of the day, but here it goes... I have an app that I need to distribute "in house" to be used by sales at a trade show. I successfully created a self signed, zipaligned, release apk file using Android Studio (in Windows 7). The name of the output file though is simply app-release.apk. Why is my app name not prefixed to the output file like MyApplication-release.apk? I suspect it has something to do with the folder structure in Android Studio where it is: MyApplication -> app -> src -> etc,etc. I tried refactoring the "app" folder to match my app name but it gives an error. I'm sure I am missing something simple.
推荐答案
是的,它使用应用程序模块的文件夹名称.如果您重命名文件夹,您还需要使用更新后的名称更新您的 settings.gradle 文件;重构不会自动改变它.
Yes, it uses the folder name of your application's module. If you rename the folder, you also need to update your settings.gradle file with the updated name; the refactoring doesn't automatically change it there.
更改settings.gradle 后,请确保将项目与 Gradle 文件重新同步.它应该在编辑器窗口的顶部放置一个横幅,提醒您需要这样做;如果没有,请单击工具栏中的按钮.
After you change settings.gradle, make sure you re-sync your project with the Gradle files. It should put a banner at the top of your editor windows reminding you that you need to do it; if you don't, then click the button in the toolbar.
这篇关于为什么我的 APK 名称是通用的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!