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 gr开发者_C百科eater...
Something like
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.
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.
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.
精彩评论