How to generate signed APKs for separate modules in Android Studio?

て烟熏妆下的殇ゞ 提交于 2020-03-20 21:14:56

问题


My project having 3 modules

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

Now I want to generate Signed APK for module Videograbber

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

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

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

Please help me


回答1:


You will have to create a task in Gradle combining all the assembles, then you can use AndroidStudio to run the task.




回答2:


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.

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

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

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

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.



来源:https://stackoverflow.com/questions/60672417/how-to-generate-signed-apks-for-separate-modules-in-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!