Android custom Properties Chinese garbled characters

1. We can write many constants under the assets file, and the file suffix is ​​properties. As shown in the picture

2. Create a file under the created assets file. After creation, the directory format will be like this

3. Open the created Constant.properties and write the constant value

4. There is a problem with writing this way in the code. Chinese garbled characters will appear, but English characters will not.

5. You cannot load it directly. Instead, there will be no Chinese garbled characters.

 

6.AndroidStudio is set up like this

 

 

 

 

 

Guess you like

Origin blog.csdn.net/beautifulYuan/article/details/111355394