自定义RES SCREENS和RES图标将替换为默认Cordova屏幕和图标 [英] Custom RES SCREENS and RES ICONS get replaced with default Cordova screen and icon

查看:215
本文介绍了自定义RES SCREENS和RES图标将替换为默认Cordova屏幕和图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Apache Cordova使用Visual Studio工具。



我测试了CLI 6.4.0,不幸的是RES SCREENS和RES图标。如果我使用CLI 6.3.1,这个问题消失。为了演示它,我从头开始创建了一个新项目,只添加了cordova-plugin-splashscreen(版本4.0.0),并用原来的屏幕图片替换了自定义的图片。



在构建系统时,系统会自动创建一些额外的文件夹/文件(一个新的文件夹/文件,我在我的config.xml),所以在我的情况下,我得到这些新的文件夹/文件:




  • res / drawable-land-hdpi / screen.png

  • res / drawable-land-ldpi / screen.png

  • res / drawable-land-mdpi / screen.png

  • res / drawable-land-xdpi / screen.png

  • res / drawable-port-hdpi / screen.png

  • res / drawable-port-ldpi / screen.png

  • res / drawable-port-mdpi / screen.png

  • res / drawable-port-xdpi / screen.png













< hr>



PNG文件反映了我在RES / SCREENS / ANDROID文件夹中的内容。



同时,构建将这些新文件夹(如上所述)复制到PLATFORMS / ANDROID / RES文件夹。问题是这些文件夹内的图像不是我在项目中选择的原始图像,但它们是Cordova徽标(创建新项目时默认添加的徽标)。






解决方案

感谢Elvis指出!您的错误报告已关闭,因为它是重复的问题。



这是官方错误报告的链接: https://issues.apache.org/jira/browse/CB-12077



这里是GitHub Pull请求:
https://github.com / apache / cordova-android / pull / 343


I'm using Visual Studio tools for Apache Cordova.

I've tested the CLI 6.4.0 and unfortunately there is a bug with the RES SCREENS and RES ICONS. If I use CLI 6.3.1 this issue disappears. To demonstrate it I've created a new project from scratch, added only the cordova-plugin-splashscreen (ver 4.0.0) and replaced the original screen images with custom ones.

The issue happens when I try to debug with a physical android device connected via USB.

On build the system automatically creates some extra folders/files (one new folder/file for each splash configuration I have in my config.xml), so in my case I get these new folders/files:

  • res/drawable-land-hdpi/screen.png
  • res/drawable-land-ldpi/screen.png
  • res/drawable-land-mdpi/screen.png
  • res/drawable-land-xdpi/screen.png
  • res/drawable-port-hdpi/screen.png
  • res/drawable-port-ldpi/screen.png
  • res/drawable-port-mdpi/screen.png
  • res/drawable-port-xdpi/screen.png



The PNG files reflects what I have in my RES/SCREENS/ANDROID folders.

At the same time the build copies these new folders (described above) to the PLATFORMS/ANDROID/RES folder. The issue is the images inside those folders are not the original ones I have chosen in my project, but they are the Cordova Logo (the one that is added by default when a new project is created).


解决方案

Thanks Elvis for pointing it out! Your bug report has been closed because it's a duplicate issue.

Here is the link to the official bug report: https://issues.apache.org/jira/browse/CB-12077

And here is the GitHub Pull Request: https://github.com/apache/cordova-android/pull/343

这篇关于自定义RES SCREENS和RES图标将替换为默认Cordova屏幕和图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆