Changing the emulator locale from the adb shell
To change the locale in the emulator by using the adb shell.

  • Pick the locale you want to test and determine its BCP-47 language tag, for example, Canadian French would be fr-CA.
  • Launch an emulator.
  • From a command-line shell on the host computer, run the following command:
    adb shell
    or if you have a device attached, specify that you want the emulator by adding the -e option:
    adb -e shell
  • At the adb shell prompt (#), run this command:
    setprop persist.sys.locale [BCP-47 language tag];stop;sleep 5;start
    Replace bracketed sections with the appropriate codes from Step 1.
    For instance, to test in Canadian French:

setprop persist.sys.locale fr-CA;stop;sleep 5;start

This causes the emulator to restart. (It looks like a full reboot, but it isn't.) Once the Home screen appears again, re-launch your app, and the app launches with the new locale.

【android】【android studio】修改emulator的本地化环境的更多相关文章

  1. Introducing Visual Studio’s Emulator for Android

    visual studio 2015支持Android开发了. Microsoft released Visual Studio 2015 Preview this week and with it ...

  2. Android必知必会-Android Studio修改包名

    如果移动端访问不佳,请尝试–> Github版 背景 公司做相似产品较多,一般都是以某个产品为基础修改,逐步替换设计图的切图.这个就会导致需要经常为Copy的项目修改包名. 这里是参考一些网上的 ...

  3. 【Android Studio安装部署系列】二十七、Android studio修改项目名称和包名

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 实际项目开发中可能碰到项目名称写错了或者需要修改,而且包名可能也想要修改,那么如何操作呢. 本文是在Android Studio3. ...

  4. Android Studio 修改包名最便捷做法

    Android Studio,咱们开发安卓的利器,自推出就受到移动开发者的追捧,但一路走来,大家谈到他,充满了兴奋之情之余,也略显羞涩.随版本自推出以来,不断完善BUG,但咱们还是深深地踩了进去,说多 ...

  5. android studio 修改新建EmptyActivity默认布局

    https://www.jianshu.com/p/d4f201135097 打开你的Android Sudio安装目录,我的为D:\Program Files\Android\Android Stu ...

  6. Android状态栏颜色修改

    android状态栏颜色修改   状态栏颜色的修改在4.4和5.x环境下分别有不同的方式,低于4.4以下是不能修改的.   5.x环境下 方式一,状态栏将显示为纯净的颜色,没有渐变效果 /** * 状 ...

  7. 张高兴的 Xamarin.Android 学习笔记:(一)环境配置

    最近在自学 Xamarin 和 Android ,同时发现国内在做 Xamarin 的不多.我在自学中间遇到了很多问题,而且百度到的很多教程也有些过时,现在打算写点东西稍微总结下,顺便帮后人指指路了. ...

  8. Android #Android开发环境搭建

    Android #Android开发环境搭建 1.下载:Google在国服的官网 https://developer.android.google.cn/index.html 1.点击首页 “ 获取 ...

  9. android中用studio更改包名

    Android Studio,咱们开发安卓的利器,自推出就受到移动开发者的追捧,但一路走来,大家谈到他,充满了兴奋之情之余,也略显羞涩.随版本自推出以来,不断完善BUG,但咱们还是深深地踩了进去,说多 ...

随机推荐

  1. TaskFactory单例模式利用xml

    /** * * Copyright (c) 1995-2009 Wonders Information Co.,Ltd. * 1518 Lianhang Rd,Shanghai 201112.P.R. ...

  2. Polly+AspectCore实现熔断与降级机制

    Polly+AspectCore实现熔断与降级机制 https://www.cnblogs.com/edisonchou/p/9159644.html 一.熔断.降级与AOP 1.1 啥是熔断? 在广 ...

  3. .NET Core中Circuit Breaker

    谈谈Circuit Breaker在.NET Core中的简单应用 前言 由于微服务的盛行,不少公司都将原来细粒度比较大的服务拆分成多个小的服务,让每个小服务做好自己的事即可. 经过拆分之后,就避免不 ...

  4. PartTime_网址_内

    http://www.360doc.com/content/15/0930/12/28012971_502432950.shtml 2015所有适合程序员接私活的网站 请把 @ 换成 . 猪八戒    ...

  5. 045 Jump Game II 跳跃游戏 II

    给定一个非负整数数组,你最初位于数组的首位.数组中的每个元素表示你在该位置的最大跳跃长度.你的目标是用最小跳跃次数到达最后一个索引.例如: 给定一个数组 A = [2,3,1,1,4]跳到最后一个索引 ...

  6. Spring Boot Admin 监控中心

    Spring Boot Admin 监控中心 Spring Boot Admin用来收集微服务系统的健康状态.会话数量.并发数.服务资源.延迟等度量信息 服务端 建立spring-cloud-admi ...

  7. 告别CMD.windows终端神器conemu设置

    前言 一种刘姥姥进大观园的感觉,现在是见啥啥新鲜.因为之前不怎么接触到命令操作,平时偶尔用用cmd也没觉得什么不妥.直到现在经常调试脚本,使用git越发感觉不方便.看见同事使用的terminal绚丽夺 ...

  8. 洛谷 P1588 丢失的牛

    题目描述 FJ丢失了他的一头牛,他决定追回他的牛.已知FJ和牛在一条直线上,初始位置分别为x和y,假定牛在原地不动.FJ的行走方式很特别:他每一次可以前进一步.后退一步或者直接走到2*x的位置.计算他 ...

  9. AHK进阶之路

    本文摘自 http://www.cnblogs.com/echorep/p/4911117.html   小鸟学AHK(1)之运行程序或打开文档 AHK就是AutoHotKey,是一款免费的.Wind ...

  10. C基础的练习集及测试答案(1-15)

    练习题:注:标有(课堂)字样的为课上练习,其他为课下练习基础题(50题)1.(课堂)编写程序,输出“XXX欢迎来到动物园!”(XXX是自己的名字). //1.(课堂)编写程序,输出“XXX欢迎来到动物 ...