如何在Android Studio中为单独的模块生成签名的APK? [英] How to generate signed APKs for separate modules in Android Studio?

查看:198
本文介绍了如何在Android Studio中为单独的模块生成签名的APK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目有3个模块

include ':app'
include ':videograbber'
include ':audiograbber'

现在我想为Videograbber模块生成Signed APK

Now I want to generate Signed APK for module Videograbber

当我在Android Studio中使用生成签名的APK"(应用包)时,它会直接生成"app",而无需询问任何选择屏幕

When I used Generate Signed APK (app bundle) in Android Studio , It directly generating for 'app' without asking any selection screens

我不知道如何为其他模块生成

I don't know how to generate for other modules

我阅读了这个问题: Android Studio:多个模块的多个APK a>

I read this question : Android Studio: Multiple APKs for Multiple Modules

但是它仅具有基于CLI的解决方案.我需要通过工作室

But it only have CLI based solution . I need to do it via studio

请帮助我

推荐答案

首先,请记住,必须在要生成APK的模块中应用插件com.android.application.

First of all, remember that you have to apply the plugin com.android.application in the modules in which you want to generate an APK.

第二,我的解决方案适用于Android Studio 3.6.1 .

Second of all, my solution works on Android Studio 3.6.1.

您可以继续Build-> Generate Signed Bundle / APK...,此窗口将打开:

You can go on Build -> Generate Signed Bundle / APK... and this window will be opened:

您必须选择APK并按Next. 完成此操作后,将打开另一个窗口:

You have to select APK and press Next. After doing that, this other window will be opened:

在此窗口的Module选择器中,您可以选择所需的模块(例如:videograbber)并为所选模块生成APK.

In the Module picker of this window, you can choose the module you prefer (e.g. :videograbber) and generate the APK for the selected module.

这篇关于如何在Android Studio中为单独的模块生成签名的APK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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