问题
Is there a way to compile and deploy both the mobile and wear app at the same time from Android Studio?
I find myself making changes to both parts and then I need to wait for one to finish before I can deploy the next.
回答1:
If you have the default configurations for project names on Android Studio. You should have "mobile" and "wear" options in the launch combo.
- Click on the arrow, choose "Edit Configurations..."
- Select the "wear" application on the left list
- On the right side, scroll down to "Before Launch"
- Click on the green plus sign
- Choose "Run another configuration"
- Pick "mobile"
- Use the arrows to make "mobile" first
- Be sure to rebuild you project (FUll clean and build)
- When you have "wear" selected, click on the green arrow to launch and it should launch both application in sequence with just one click.
I think that's the best we can do for now.
来源:https://stackoverflow.com/questions/25075534/deploying-mobile-and-wear-at-the-same-time