Community
cancel
Showing results for 
Search instead for 
Did you mean: 
yusuf_m_
Beginner
90 Views

Add xxxhdpi icon to intel xdk

hello 

anyone now how to add xxxhdpi icon to intel xdk without error, i use this commande

<platform name="android">
    <icon platform="android" src="www/ldpi.png" density="ldpi" width="36" height="36" />
    <icon platform="android" src="www/mdpi.png" density="mdpi" width="48" height="48" />
    <icon platform="android" src="www/hdpi.png" density="hdpi" width="72" height="72" />
    <icon platform="android" src="www/xhdpi.png" density="xhdpi" width="96" height="96" />
    <icon platform="android" src="www/xxhdpi.png" density="xxhdpi" width="144" height="144" />
    <icon platform="android" src="www/xxxhdpi.png" density="xxxhdpi" width="192" height="192" />

</platform>

 but i have i build error 

please help

 

Tags (2)
0 Kudos
5 Replies
PaulF_IntelCorp
Employee
90 Views

I don't believe there are any devices that actually support that XXX resolution... Are you building with CLI 6.2.0?

yusuf_m_
Beginner
90 Views

no CLI 5.4.1 but i test the 6.2.0 and the same probleme,

when a write the commande into intelxdk.config.additions file i have a build error 

PaulF_IntelCorp
Employee
90 Views

I just did a test build with the "hello cordova" sample project, which includes a xxx icon and it built with no issues. Please create a project from that sample and confirm that you can also build it. If you can build the "hello cordova" sample then I recommend that you compare where the icons are located in that project with yours, and how they are being referenced in that project, compared to yours.

Screen Shot 2017-02-16 at 12.50.43 .png

Vijay_R_3
Beginner
90 Views

Paul F. (Intel) wrote:

I just did a test build with the "hello cordova" sample project, which includes a xxx icon and it built with no issues. Please create a project from that sample and confirm that you can also build it. If you can build the "hello cordova" sample then I recommend that you compare where the icons are located in that project with yours, and how they are being referenced in that project, compared to yours.

Though it is configured fine in the hello cordova app. It is not copying the added icon files to the build. Check the build log below: copying image from .../cordova_project/PackageAssets/package-assets/android/icon-xxhdpi.png to .../cordova_project/platforms/android/res/drawable-xxhdpi/icon.png cp: no such file or directory: .../cordova_project/PackageAssets/package-assets/android/icon-xxhdpi.png copying image from .../cordova_project/PackageAssets/package-assets/android/icon-xxxhdpi.png to .../cordova_project/platforms/android/res/drawable-xxxhdpi/icon.png cp: no such file or directory: .../cordova_project/PackageAssets/package-assets/android/icon-xxxhdpi.png copying image from .../cordova_project/PackageAssets/package-assets/android/icon-ldpi.png to .../cordova_project/platforms/android/res/drawable-ldpi/icon.png copying image from .../cordova_project/PackageAssets/package-assets/android/icon-mdpi.png to .../cordova_project/platforms/android/res/drawable-mdpi/icon.png copying image from .../cordova_project/PackageAssets/package-assets/android/icon-hdpi.png to .../cordova_project/platforms/android/res/drawable-hdpi/icon.png
PaulF_IntelCorp
Employee
90 Views

Interesting, when I do the test, adding those two icon files via the intelxdk.config.additions.xml file, I get this in the detailed build log:

copying image from .../cordova_project/PackageAssets/package-assets/android/icon-xxhdpi.png to .../cordova_project/platforms/android/res/drawable-xxhdpi/icon.png
copying image from .../cordova_project/PackageAssets/package-assets/android/icon-xxxhdpi.png to .../cordova_project/platforms/android/res/drawable-xxxhdpi/icon.png

and I can also see the icons inside the built APK (you can unzip the APK and inspect it directly, the icon filenames will be changed to icon.png, but you will find them).

For example, I added just two icons to the project, both in the intelxdk.config.additions.xml file and inspecting one of the built APK files, which I unzipped, I see this:

$ ls -1
AndroidManifest.xml*
META-INF/
assets/
classes.dex*
lib/
res/
resources.arsc*

$ find . -name icon.png
./res/drawable-xxhdpi-v4/icon.png
./res/drawable-xxxhdpi-v4/icon.png

$

When I view those two icon.png files they match exactly the two icons I added using the intelxdk.config.additions.xml file.

  • Are you using symbolic links to reference the files?
  • Is there a typo in your intelxdk.config.additions.xml file that might be causing the XDK to abort parsing the entire file?
  • Are you building with CLI 6.2.0?
Reply