Android Project encoding batch modification (GBK to UTF-8) (reprint)

Source: Internet
Author: User

Since the project early Android project selected GBK coding, there is no time to change. In order to unify the coding, the whole project is intended to be transformed into UTF-8.
Traditional one file modification code, too slow too clumsy, try to change the effect of the batch is not very good, the project error.
Finally, find eclipse has a plugin that can be modified to share the entire process.
1, download Com.lifesting.tool.encoding_1.0.0.jar (http://download.csdn.net/detail/achunb604/6235849).
2. Copy the plugin Com.lifesting.tool.encoding_1.0.0.jar to the Eclipse/plugins directory and restart Eclipse.
3. Select the project, right-select Properties, then click Convert Setting to set the transcoding rules:

4, in the Setup project, right-click on the project, SRC and then tap lifesting tools->set Encoding. The plugin will complete the transcoding work. (Discovery *. xml does not go, because <?xml version= "1.0" encoding= "Utf-8"?>)

5, found that the local no problem, but from the SVN down, the default code or GBK, according to modify, you can ensure that each down is UTF-8 code.

6, after the submission, so that other people from the SVN check out of the project, run to the phone found some resources file image size, font changes. Finally find the need to modify Android project. Classpath encoded as UTF-8, then the resources found are OK.

At this point the whole project code is changed, and the project is working well.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.