When Android studio imports an eclipse Android project, the following error occurs: gradle: Warning: un dable characters encoded in euc_cn.

Source: Internet
Author: User

Migrate the project from eclipse to Android studio. There are several minor issues.

Question 1: Export from eclipse to the android studio project structure file. Because the project itself depends on another android project,

This causes the import to Android studio to fail after the export. If you encounter the same problem, you can remove the dependent project first.

Question 2: About encoding. First of all, in eclipse, our files are set to UTF-8 by default. There is no garbled problem for the migration to Android studio.

Some may encounter a problem: the Chinese characters in the Code (including the annotated Chinese characters) should jump out of error: gradle: Warning: Non- able characters encoded for euc_cn during compilation.

The code of this project and the idea code are useless. In addition, all Chinese characters are displayed normally, without being garbled.

Then, add a script to the build. gradle file based on the information:

// Set the Encoding
Tasks. withtype (compile ){
Options. Encoding = "UTF-8"
}


Related Article

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.