简体   繁体   English

每当生成已签名的 APK 时,强制 Android Studio 清理项目

[英]Force Android Studio to clean project whenever generating signed APK

Is there a way to make Android Studio preform a clean project automatically whenever I generate a signed APK?每当我生成签名的 APK 时,有没有办法让 Android Studio 自动生成一个干净的项目?

Normally I do this manually before releasing an update, but apparently yesterday I did not and now my app strings are all out of sync.通常我在发布更新之前手动执行此操作,但显然昨天我没有这样做,现在我的应用程序字符串全部不同步。 I'd like to prevent this from happening again by making Android Studio clean the project as part of the generate APK process.我想通过让 Android Studio 清理项目作为生成 APK 过程的一部分来防止这种情况再次发生。

Any ideas?有任何想法吗?

Android studio is based on IntelliJ Idea. Android studio基于IntelliJ Idea。 In IntelliJ Idea you have to do the following from the GUI menu.So, you have to do this manually each time you generate you apk. 在IntelliJ Idea中,您必须从GUI菜单执行以下操作,因此,每次生成apk时都必须手动执行此操作。

You could try to modify your Gradle script to clean while assotiating with progaurd for release 您可以尝试修改Gradle脚本以使其清洁,同时与progaurd一起发布。

Android Studio Build/Clean Android Studio构建/清理

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM