There are many related posts on the Internet, but all are over 12 months old and provided “solutions” are related to package version changes.
The problem occurs on xxxhdpi devices with the following error:
Fatal Exception: java.lang.RuntimeException: Canvas: trying to draw too large(XXXXXXXXXXXXXbytes) bitmap.
At last I pinpointed it in this “bug” report:
https://issues.apache.org/jira/browse/CB-13238
I played with many cordova-android versions etc fell back a lot… A couple of months ago there was no problem. I re-build a new development machine, so it must be introduced in between (probably not the old bugs).
This is the environment:
>ionic info
cli packages: (C:\Users\xxx\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.9.4
npm : 5.6.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\DEV\Android\sdk
Misc:
backend : pro
I spent much time, at last I overcame it by resizing the resources/android/splash/drawable-*.png images to their 1/3th size and converting them to PNG-8. I keep a copy of the smaller ones and replace any newly generated ones. Of course this is a sub-optimal solution…
During build, there is only one screen.png file in the package, under res/drawable-mdpi-v4 folder, with size 1280x1920 px. So the files are not copied in correct directories. I don’t know the faulting module…
Are any of you aware of this problem? Do you know the solution?