Start two Android emulators with different locale

2020-07-18 03:48发布

Most of the idea is in the title, I just would like to know if it is possible to start 2 emulators at the same time with 2 different locale (to test the I18n of my app). If there was a way of doing it in Eclipse, that would be greater...

Something like This

3条回答
三岁会撩人
2楼-- · 2020-07-18 04:03

If you click the Button for starting the emulator in Eclipse (the litlle mobile phone) Eclipse should open a dialog that lets you choose which android virtual device (AVD) you want to start. You can create a second AVD in this dialog and then start them both after each other.

Now you have to change the locale of one of the emulators to the wanted language. The emulator should save this settings so you have to configure this only once.

查看更多
该账号已被封号
3楼-- · 2020-07-18 04:04

In Eclipse, this is easy to do. Use the Android Virtual Device (AVD) manager to set up as many emulators as you want. Depending on whether you've updated to the latest version of the Eclipse plug-in, the button to launch the AVD manager will either be a black phone or the Android Robot's head above a black square with an arrow in it. Either way it's in the toolbar near the shortcuts for Save, Print, etc.

In the AVD you can create various emulators with different Android versions (download other SDKs in the 'Available Packages' menu in the left). Once you've created the emulators, start them with the button on the right. You can have multiple emulators running at the same time if you want. The emulators have a program installed on them already called 'Custom Locale' that lets you change their location information. You can't do this while creating the emulators, but it's saved when you do in the emulator so you don't need to do it every time.

After that, to choose which emulator your program will run on, change its run configuration Target to manual. This is done by clicking on the more options arrow next to the green 'Start Program' button, selecting Run Configurations, the Target tab, then selecting manual. You can also do this by right clicking on your project in the project browser (list on the left), and the option is under 'Run As' -> Run Configurations.

查看更多
啃猪蹄的小仙女
4楼-- · 2020-07-18 04:09

To connect adb to a particular emulator or device, use one of the options "-e", "-d" or "-s " as documented for the ADB tool. http://developer.android.com/tools/help/adb.html

In general the documentation is a great place to start.

查看更多
登录 后发表回答