Andriod Studio中setText输出中文在AVD中显示乱码的解决方法

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView tv = (TextView)findViewById(R.id.textView);
        tv.setText("我的世界");
    }

如果创建项目后直接在AVD中运行,则显示乱码,最好的解决办法就是在状态栏里有个File Encoding的属性,默认是"Utf-8",把它改为"GBK"再运行就没有乱码问题了

 http://hi.baidu.com/proglife/item/8d6a159a9aa34d4bf0421513

原文地址:https://www.cnblogs.com/chen110xi/p/3239596.html