Coder Social home page Coder Social logo

Comments (8)

fortunella avatar fortunella commented on May 10, 2024 1

Yeah, with Cordova 9 it's working!
Thanks a lot for your support.

from capacitor-assets.

fortunella avatar fortunella commented on May 10, 2024

It seems that icon-foreground.png and icon-background.png are ignored. When I change the icon.png in /resources to the default Ionic icon this is used instead of foreground and background.

I tried to remove the src attribute from config.xml, but then I get an error:
One of the following attributes are set but missing the other for the density type: ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi. Please ensure that all require attributes are defined.

Any ideas what’s going wrong here?

from capacitor-assets.

fortunella avatar fortunella commented on May 10, 2024

What can I do to get this working?

from capacitor-assets.

imhoffd avatar imhoffd commented on May 10, 2024

@fortunella Apologies, I've been busy with other priorities.

Is cordova-res generating the appropriate config for Adaptive Icons as per the Cordova documention?

What version of Cordova and cordova-android are you using?

from capacitor-assets.

fortunella avatar fortunella commented on May 10, 2024

The config.xml seems good. After running cordova-res it contains this section:

<platform name="android">
  <allow-intent href="market:*" />
  <icon background="resources/android/icon/ldpi-background.png" density="ldpi" foreground="resources/android/icon/ldpi-foregr
ound.png" src="resources/android/icon/drawable-ldpi-icon.png" />
  <icon background="resources/android/icon/mdpi-background.png" density="mdpi" foreground="resources/android/icon/mdpi-foregr
ound.png" src="resources/android/icon/drawable-mdpi-icon.png" />
  <icon background="resources/android/icon/hdpi-background.png" density="hdpi" foreground="resources/android/icon/hdpi-foregr
ound.png" src="resources/android/icon/drawable-hdpi-icon.png" />
  <icon background="resources/android/icon/xhdpi-background.png" density="xhdpi" foreground="resources/android/icon/xhdpi-for
eground.png" src="resources/android/icon/drawable-xhdpi-icon.png" />
  <icon background="resources/android/icon/xxhdpi-background.png" density="xxhdpi" foreground="resources/android/icon/xxhdpi-
foreground.png" src="resources/android/icon/drawable-xxhdpi-icon.png" />
  <icon background="resources/android/icon/xxxhdpi-background.png" density="xxxhdpi" foreground="resources/android/icon/xxxhd
pi-foreground.png" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
  <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
  <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
  <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
  <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
  <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
  <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
  <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
  <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
  <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
  <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
  <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
  <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>

ionic info reports these Cordova versions:

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-webview 4.0.1, (and 14 other plugins)

from capacitor-assets.

imhoffd avatar imhoffd commented on May 10, 2024

Can you try with Cordova 9? npm i -g cordova@latest

from capacitor-assets.

imhoffd avatar imhoffd commented on May 10, 2024

Awesome! Yep, Cordova 9 is required to work with Adaptive Icons. πŸ‘

from capacitor-assets.

sfrinx avatar sfrinx commented on May 10, 2024

Capacitor support Adaptive Icons?

from capacitor-assets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.