mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-19 21:29:36 +08:00
Add ability to specify main Activity in run-android
Summary: Follow up to #8190 Tested with custom parameter as well as w/o (using default value). All worked well. Differential Revision: D4220565 Pulled By: mkonicek fbshipit-source-id: e8a98542d3ff96d60ff6045b328f5b464f78ee74
This commit is contained in:
committed by
Facebook Github Bot
parent
5db7484e8d
commit
9fb520e3b2
@@ -164,7 +164,7 @@ function buildAndRun(args) {
|
||||
devices.forEach((device) => {
|
||||
|
||||
const adbArgs =
|
||||
['-s', device, 'shell', 'am', 'start', '-n', packageName + '/.MainActivity'];
|
||||
['-s', device, 'shell', 'am', 'start', '-n', packageName + '/.' + args.mainActivity];
|
||||
|
||||
console.log(chalk.bold(
|
||||
`Starting the app on ${device} (${adbPath} ${adbArgs.join(' ')})...`
|
||||
@@ -251,5 +251,9 @@ module.exports = {
|
||||
default: 'Debug'
|
||||
}, {
|
||||
command: '--variant [string]',
|
||||
}, {
|
||||
command: '--main-activity [string]',
|
||||
description: 'Name of the activity to start',
|
||||
default: 'MainActivity'
|
||||
}],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user