在程序中对组件setText出现中文乱码,统一为UTF-8也没解决这个问题。最后在build.gradle文件下添加了 android{compileOptions.encoding="GBK"}成功解决了该问题