-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Android Splashscreen theme quirk #1290
Comments
The workaround I found (so far) is to edit AndroidManifest.xml and replace: However, everytime the app is built, this change is reverted. Any ideas on how to workaround this issue? This constant double-building is really tiresome and inconvenient. |
You'll have to find what is actually manipulating the theme. Assuming that your project doesn't have a Once you pinpoint the plugin that is overwriting that change, then you'll have to ask the maintainers of the plugin to solve the problem, or fork the plugin and make the change required.
|
Thanks Norman, instead of dealing all the plugins I simply added this to my config.xml to have the proper style set automatically on build time: <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<activity android:theme="@style/Theme.App.SplashScreen"></activity>
</edit-config> For anyone else in search for this solution, this requires the XML namespace UpdateMy own cordova-plugin-in-app-updates was changing the theme for its own purposes of showing a notification bar. I have updated the plugin to remove that and now everything works without the edit-config option. |
A common issue people are having when upgrading to cordova-android@11 with the new splashscreen system is Google's compatibility library imposes a requirement on the app to use the splashscreen theme as the default starting theme. However many users are using custom configs and/or plugins to override this theme with another which causes the compatibility library to crash with an error message that isn't very useful.
The full stack trace as an example can be found below:
Stacktrace
This should be documented in some fashion in our Quirks section. I don't think we need ot include the entire stack, but key parts like
References:
apache/cordova-android#1559
apache/cordova-android#1534
apache/cordova-android#1497
The text was updated successfully, but these errors were encountered: