Build error 'cannot read property startsWith of undefined' when using adaptive icons
See original GitHub issueBug Report
Sample project: test.zip
Extract and run:
cordova platform add android
cordova prepare android
Problem
It fails with Cannot read property 'startsWith' of undefined
.
What is expected to happen?
Successful prepare
What does actually happen?
It fails with an error message
Information
This only happens if you have both a normal and an adaptive icon.
Command or Code
Included above
Environment, Platform, Device
Windows 10 64-bit
Version information
Cordova 9.0.0 (cordova-lib@9.0.1)
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Build error 'cannot read property startsWith of undefined' when ...
Information. This only happens if you have both a normal and an adaptive icon. Command or Code. Included above. Environment, Platform, Device.
Read more >[GitHub] [cordova-cli] breautek commented on issue #506: Build ...
[GitHub] [cordova-cli] breautek commented on issue #506: Build error 'cannot read property startsWith of undefined' when using adaptive icons.
Read more >React Native [TypeError: Cannot read property 'startsWith' of ...
finally I have solved the problem by adding string type and :void to filepath instead of any ( i dont know what this...
Read more >[GitHub] [cordova-android] breautek commented on issue #984
... [cordova-android] breautek commented on issue #984: Build error 'cannot read property startsWith of undefined' when using adaptive icons.
Read more >org.apache.cordova.issues - 2020 June - 1,776 messages - MarkMail
[GitHub] [cordova-android] breautek commented on issue #984: Build error 'cannot read property startsWith of undefined' when using adaptive icons - GitBox.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue should be fixed in the latest
cordova-android
release, (currently cordova-android@9.0.0) by https://github.com/apache/cordova-android/pull/1001If you still have an issue please open a new issue in the cordova-android repo at https://github.com/apache/cordova-android/issues
You can try forking
cordova-android
, branch off therel/8.1.0
tag and apply the https://github.com/apache/cordova-android/pull/1001 patch. Then you can install the platform over git.cordova platform add <https://github.com/your/cordova-android-fork#8.1.x-branch