EmilJunker commented on issue #942:
URL: https://github.com/apache/cordova-android/issues/942#issuecomment-915174432


   I'm running into the same problem with a Cordova project I'm working on.
   
   You can find the source code here: 
https://github.com/EmilJunker/waistline/tree/android-icons (on branch 
`android-icons`). You should be able to reproduce it with this code.
   
   Note that this isn't my app, I'm just contributing to it.
   
   This is the setup in `config.xml`:
   ```xml
   <icon density="ldpi" background="res/icon/android/ldpi-background.png" 
foreground="res/icon/android/ldpi-foreground.png" src="res/android/ldpi.png" />
   <icon density="mdpi" background="res/icon/android/mdpi-background.png" 
foreground="res/icon/android/mdpi-foreground.png" src="res/android/mdpi.png" />
   <icon density="hdpi" background="res/icon/android/hdpi-background.png" 
foreground="res/icon/android/hdpi-foreground.png" src="res/android/hdpi.png" />
   <icon density="xhdpi" background="res/icon/android/xhdpi-background.png" 
foreground="res/icon/android/xhdpi-foreground.png" src="res/android/xhdpi.png" 
/>
   <icon density="xxhdpi" background="res/icon/android/xxhdpi-background.png" 
foreground="res/icon/android/xxhdpi-foreground.png" 
src="res/android/xxhdpi.png" />
   <icon density="xxxhdpi" background="res/icon/android/xxxhdpi-background.png" 
foreground="res/icon/android/xxxhdpi-foreground.png" 
src="res/android/xxxhdpi.png" />
   ```
   
   When I run `cordova prepare android`, I get this error:
   ```
   ENOENT: no such file or directory, open 
'/waistline/app/platforms/android/app/src/main/res/mipmap-ldpi-v26/ic_launcher.xml'
   ```
   
   If I change the setup in `config.xml` to ...
   ```xml
   <icon density="ldpi" src="res/android/ldpi.png" />
   <icon density="mdpi" src="res/android/mdpi.png" />
   <icon density="hdpi" src="res/android/hdpi.png" />
   <icon density="xhdpi" src="res/android/xhdpi.png" />
   <icon density="xxhdpi" src="res/android/xxhdpi.png" />
   <icon density="xxxhdpi" src="res/android/xxxhdpi.png" />
   ```
   i.e. remove the `background` and `foreground` attributes then I don't get 
the error. So it must have something to do with the adaptive icons.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to