Theme Error - How to Fix

Theme Error - how to fix?

This is a bug in 28.0.0 and the only fix(workaround) is adding this to your Build.gradle:

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "com.android.support") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "27.1.1"
}
}
}
}

Which somehow, this bypasses the issue and uses 27 support library for that. Otherwise, you may wanna update your Android Studio to canary channel version or using backward support library like 27.1.1 or etc.

Error: How to fix import demo for wordpress theme

This is because of PHP Deprecated function usage.

 maybe_unserialize( preg_replace( '!s:(\d+):"(.*?)";!es', "'s:'.strlen('$2').':\"$2\";'", stripslashes( $meta['value'] ) ) )

Replace with below code:

preg_replace_callback( '!s:(\d+):"(.*?)";!s', array( $this, 'fix_serialized_string_type_callback' ), stripslashes( $meta['value'] ) );

And add below function in same file (wp-content\themes\random\framework\includes\wpalchemy\MetaBox.php),

protected function fix_serialized_string_type_callback( $matches ) {
return sprintf( 's:%s:"%s";', strlen( $matches[2] ), $matches[2] );
}

If this is not work upgrade your framework. I think framework author fixed this issue

https://github.com/farinspace/wpalchemy/blob/master/wp-content/wpalchemy/MetaBox.php

Error in changing theme in android studio

I'm having the same issue:

Sample Image

Since your project seems to be a new project with the default configuration, and you already have:

<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

And also:

android:theme="@style/AppTheme.NoActionBar">

In your Manifest, it seems to be a bug or problem with Android Studio and i hope it will fixed soon.

But with our codes, everything is okay, no problem, i will report this to Google.

And onething more, because that layout is coming from the main_layout.xml with this line:

<include layout="@layout/content_main" />

It should be the reason, but, i've tried that and same issue.

But, for now, if you need to design that Layout, you may want to change the Theme for your Android Studio's Preview to a Light with DarkActionbar.

Or change the theme to AppTheme, like this:

Sample Image

It should work then.

How do I fix this error I'm getting trying to include Dark Mode with CSS?

Your top body {} rule is missing its closing }.

Change this:

body {
--text-color: #222;
--bkg-color: #fff;

body.dark-theme {
--text-color: #eee;
--bkg-color: #121212;
}

to this:

body {
--text-color: #222;
--bkg-color: #fff;
} /* <-- here */

body.dark-theme {
--text-color: #eee;
--bkg-color: #121212;
}


  • However, your stylesheet still has repeating values, you can normalize it somewhat by defining your actual color values only on the :root (aka html):
    • And then referencing them from within both @media (prefers-color-scheme: dark) { and body.dark-theme, which means UA-based color schemes can work as well as JS-based overrides too.
      • Because the DOM still doesn't have an API to set color scheme for some reason.
  • Also, you don't need a * { font-family: } rule, just set it on body.
    • And Helvetica should come before Arial because Helvetica just looks better.

/* #region Light/Dark Scheme Properties */

:root {
--text-color-light: #222;
--bkg-color-light : #fff;

--text-color-dark : #eee;
--bkg-color-dark : #121212;

/* Default to the light scheme (before `prefers-color-scheme` and/or `body.dark-theme` are applied): */
--text-color : var(--text-color-light);
--bkg-color : var(--bkg-color-light);
}

@media (prefers-color-scheme: dark) {
/* For UA color scheme: */
body {
--text-color: var(--text-color-dark);
--bkg-color : var(--bkg-color-dark);
}
}
body.dark-theme {
/* For CSS-class/JS-based color scheme override: */
--text-color: var(--text-color-dark);
--bkg-color : var(--bkg-color-dark);
}

/* If you want to add a CSS clas `.light-theme` to *override* prefers-color-scheme: dark, then uncomment this: */
/*
body.light-theme {
/* For CSS-class/JS-based color scheme override: */
--text-color: var(--text-color-light);
--bkg-color : var(--bkg-color-light);
}
*/

/* #endregion Light/Dark Scheme Properties */

/*
*DO NOT* reference any of the `-dark` or `-light` properties at all below this point.
You only need to reference the non-suffixed custom-properties, as those will always be set to the current *effective* color scheme's values, whether from `prefers-color-scheme` or by `.dark-theme` (or `.light-theme`).
*/

body {
background-color: var(--bkg-color);
font-family: Helvetica, Arial, sans-serif;
}

h1,
p {
color: var(--text-color);
}


Related Topics



Leave a reply



Submit