如何在 Android Studio(非调试)中创建发布 android 库包 (aar) [英] How to create a release android library package (aar) in Android Studio (not debug)
问题描述
我已经构建了我的 android 库包 (aar) 并且构建的结果是在..\app\build\outputs\aar"文件夹.这个文件夹中的文件叫做app-debug.aar",所以我猜它是在调试模式下构建的,所以我想知道如何生成构建的版本,即app-release.aar".我怎样才能做到这一点?此外,是否可以使用另一个自定义名称生成构建,例如myCustomAppName-release.aar"而不是app-release.aar".
I have built my android library package (aar) and the result of build is created in "..\app\build\outputs\aar" folder. The file within this folder is called "app-debug.aar" so I guess it has been built in debug mode so I would like to know how to genereate the release built, that is, "app-release.aar". How can I do this? Also, is it possible to genereate the build with another custom name, for example, "myCustomAppName-release.aar" instead of "app-release.aar".
推荐答案
在 Android Studio 1.2+ 中,有一个完整的 gradle
菜单,列出了所有可用的 gradle
任务.
In Android Studio 1.2+, there is a complete gradle
menu that lists all of the available gradle
tasks.
我在启用默认选项的 IDE 右侧找到了这个菜单.
I found this menu on the right side of the IDE with default options enabled.
右键单击您想要的任务,然后单击运行".
Right click the task you want and click "Run".
这篇关于如何在 Android Studio(非调试)中创建发布 android 库包 (aar)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!