I built my app, using the default "ionic start" command. I chose "blank" app and if I test on browser, background is white, but if I test the same blank app, on my android phone using "ionic cordova run android" the app background is black. Why?
CodePudding user response:
I had the same problem and I solved it like this.
- Open theme/variable.scss
- Search @media (prefers-color-scheme: dark) and replace by @media (prefers-color-scheme: primary)
CodePudding user response:
Latest ionic update has theme related conflicts in latest android versions (not sure).
My solution-
- Open theme/variables.scss inside your project.
- Search for "dark" and you will find something like @media..dark..
- Comment out the whole block related to dark.
- Open index.html and search 'light dark'. Remove the 'dark' and rebuild the app.
- Now your app uses correct colors.