Android Studio Error-----r all show red----. 9 Picture Error

Source: Internet
Author: User

After importing the Android project, R all turns red, the console has the following tips

The lack of some resources, such as pictures, and then I found that there is a picture resources, import image resources, still error, as follows

Error:execution failed for task ': Generalappn:mergedebugresources '.

Some information was found to be due to the. 9 PNG image There is a problem with Android studio

"Point Nine" is a special image form in the application software development of Andriod platform, the file extension is:. 9.png

The smartphone has the function of the automatic horizontal screen, the same interface will change the direction of the sensor in the mobile phone (or tablet), changing the orientation of the display, after the interface changes direction, the interface graphics will be due to the length and width of the changes resulting in stretching, resulting in distorted graphics.

We all know that the Android platform has many different resolutions, and many of the controls ' transduction files are blurred and distorted when zoomed in.

OK, using the dot nine PNG technology under Android, you can stretch the picture horizontally and vertically to achieve a perfect display at multiple resolutions.

If you're searching online for this. 9 PNG image The answer to the error, most of the solution is to let you to change the PNG picture, this is really a bit unrealistic, after all, the problem of the picture is not necessarily only one, and the drawing of this is not necessarily the programmer, then how to do can once and for all solve this problem? The method is:

Bulid.gradle under Buildtoolversion, add the following two sentences: Aaptoptions.cruncherenabled = False Aaptoptions.usenewcruncher = False Then Android Studio will automatically ignore this problem.

Android Studio Error-----r all show red----. 9 Picture Error

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.