欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

Fail to copy icon files

shiping1 的头像

Hi, I'm having problems with the cordova prepare command, when I execute this command I have copy errors with Android icons.

C:\dev_tools\Sources\workspace\mygm-mobile-app>cordova prepare android
cp: no such file or directory: C:\dev_tools\Sources\workspace\mygm-mobile-app\res\icon\android\icon-36-ldpi.png

cp: no such file or directory: C:\dev_tools\Sources\workspace\mygm-mobile-app\res\icon\android\icon-48-mdpi.png

cp: no such file or directory: C:\dev_tools\Sources\workspace\mygm-mobile-app\res\icon\ios\icon-72.png

cp: no such file or directory: C:\dev_tools\Sources\workspace\mygm-mobile-app\res\icon\android\icon-96-xhdpi.png

The command try to copy files from a res directory located at the root of my cordova project. But my icons are placed inside the www/res directory. It seems that this issue is related tohttps://issues.apache.org/jira/browse/CB-5145 and https://issues.apache.org/jira/browse/CB-5908.

Here is what I have inside my config.xml file  icon 以前是在res里面 现在在www目录下面 :

<icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:density="ldpi" />
<icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:density="mdpi" />
<icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:density="hdpi" />
<icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:density="xhdpi" />

I'm using cordova 3.5.0, do I have to place my 'res' directory in the root of my project or inside the 'www' directory (it seems that now it should be under www) ?

I'm not a Phonegap / Cordova expert, but it seems that Phonegap build needs everything to be inside the www directory.

So my problem is a CLI bug / regression which do not take into account decision changes about where the 'res' directory should be now, is it correct ?

Thanks

来自 https://issues.apache.org/jira/browse/CB-6759

普通分类: