Ionic2 fails to step on ionic resources, ionic2ionic

Source: Internet
Author: User

Ionic2 fails to step on ionic resources, ionic2ionic

There are a lot of online information on how to modify the application icon and Start Screen of ionic2. However, many people fail to execute ionic resources, and there are few online reasons for the failure. Let's share my experience.

1. check whether there is any resources directory under your project. If not, build the directory first and then build the directory.

2. You can find two images, icon.png and splash.png, corresponding to the app icon and startup animation. Just overwrite your app icons and animations to the two images. The recommended resolutions are 1024x1024 and 2208x2208. The image formats include png, psd, and ai.

3. Execute ionic resources. After you build the directory, you will find that there is an additional res directory under the project. Overwrite the res file platforms \ android \ res.

4. Run ionic build android package and find that the application icon and startup screen have changed.

However, there are two problems with this step. One is that ionic resources may fail. This solution usually refers to modifying the png format to the ai format. However, since the png format supports no reason, an error is reported because the image size is limited. If it is too large, an error is reported, compress the image and then execute it.

The second problem is actually caused by ionic resources. If your image resolution and size do not conform to the specifications but are executed successfully, it is very likely that the directory list under the res directory will be empty,

This is because the corresponding adaptive image fails to be generated, so that the package will fail if you perform Step 4 after step 3. The solution is to compress the image size with the recommended resolution.

 

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.