2016-08-19 210 views
0

在我的离子应用程序中,我想要离子生成我的图标。所以我在我的项目目录中有一个大小为192x192的resources/android/icon.png。离子图标生成器问题

我在CLI做的步骤:

cordova platform add android 
ionic resources --icon 

这样,我得到 “资源/安卓/图标” 目录。问题是目录是空的。

ionic info 

给出了下面的输出:

ionic info output

我config.xml中的样子:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<widget id="com.ionicframework.test" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
    <name>Test</name> 
    <description> 
     Test 
    </description> 
    <author email="[email protected]" href="http://example.com.com/"> 
    Your Name Here 
    </author> 
    <content src="index.html"/> 
    <access origin="*"/> 
    <preference name="webviewbounce" value="false"/> 
    <preference name="UIWebViewBounce" value="false"/> 
    <preference name="DisallowOverscroll" value="true"/> 
    <preference name="SplashScreen" value="none"/> 
    <preference name="android-minSdkVersion" value="16"/> 
    <preference name="BackupWebStorage" value="none"/>  
</widget> 

(如果我删除我的本地的icon.png和运行ionic platform add android比它下载默认图标和飞溅。)

因此th问题是为什么图标目录是空的?

+0

图标和启动画面在构建时添加到android –

回答

0

在你的​​3210你需要添加飞溅和图标属性。比你会看到该文件夹​​
防爆的变化:在你的财产在你的config.xml中添加这些属性,看看

<platform name="android"> 
    <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> 
    <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> 
    <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> 
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> 
    <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> 
    <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> 
    <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> 
    <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> 
    <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> 
    <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> 
    <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> 
    <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> 
    </platform> 
    <platform name="ios"> 
    <preference name="KeyboardDisplayRequiresUserAction" value="false"/> 
    <icon src="resources/ios/icon/icon.png" width="57" height="57"/> 
    <icon src="resources/ios/icon/[email protected]" width="114" height="114"/> 
    <icon src="resources/ios/icon/icon-40.png" width="40" height="40"/> 
    <icon src="resources/ios/icon/[email protected]" width="80" height="80"/> 
    <icon src="resources/ios/icon/icon-50.png" width="50" height="50"/> 
    <icon src="resources/ios/icon/[email protected]" width="100" height="100"/> 
    <icon src="resources/ios/icon/icon-60.png" width="60" height="60"/> 
    <icon src="resources/ios/icon/[email protected]" width="120" height="120"/> 
    <icon src="resources/ios/icon/[email protected]" width="180" height="180"/> 
    <icon src="resources/ios/icon/icon-72.png" width="72" height="72"/> 
    <icon src="resources/ios/icon/[email protected]" width="144" height="144"/> 
    <icon src="resources/ios/icon/icon-76.png" width="76" height="76"/> 
    <icon src="resources/ios/icon/[email protected]" width="152" height="152"/> 
    <icon src="resources/ios/icon/icon-small.png" width="29" height="29"/> 
    <icon src="resources/ios/icon/[email protected]" width="58" height="58"/> 
    <icon src="resources/ios/icon/[email protected]" width="87" height="87"/> 
    <splash src="resources/ios/splash/[email protected]~iphone.png" width="640" height="1136"/> 
    <splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/> 
    <splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/> 
    <splash src="resources/ios/splash/[email protected]~ipad.png" width="1536" height="2048"/> 
    <splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> 
    <splash src="resources/ios/splash/[email protected]~iphone.png" width="640" height="960"/> 
    <splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/> 
    </platform> 

注:使用这​​些命令ionic resources,并检查它