如何更改android studio中启动模块的默认设置? [英] How change default on launch module in android studio?

查看:304
本文介绍了如何更改android studio中启动模块的默认设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 android studio 项目中有两个模块.一个模块在屏幕上显示Hello World",另一个模块在屏幕上显示Hello Module".如何决定应用启动时运行哪个模块.显然Hello Module"正在屏幕上显示.如何在应用启动时默认使用其他模块.

I have two modules in my android studio project. One module displays "Hello World" on screen, and the other module displays "Hello Module" on screen. How to decide, which module to run when the app launches. Apparently "Hello Module" is getting displayed on screen. How to use the other module by default on launch of the app.

推荐答案

在生成 apk 之前,您项目中的所有清单都会在一个名为 manifest-merging.因此,您应该能够通过将以下意图过滤器从旧启动器活动移动到新启动器活动来更改启动器活动:

Before the apk is generated, all the manifests in your project are combined in a process called as manifest-merging. So you should be able to change launcher activity by moving the following intent-filter from your old launcher activity to the new launcher activity:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

这篇关于如何更改android studio中启动模块的默认设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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