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:
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:
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
(akahtml
):- And then referencing them from within both
@media (prefers-color-scheme: dark) {
andbody.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.
- And then referencing them from within both
- Also, you don't need a
* { font-family: }
rule, just set it onbody
.- And
Helvetica
should come beforeArial
because Helvetica just looks better.
- And
/* #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
How to Simulate Low Memory in the Android Emulator
Convert Normal Java Array or Arraylist to JSON Array in Android
How to Send Array of Params Using Volley in Android
Android: Cannot Perform This Operation Because the Connection Pool Has Been Closed
How to Launch Home Screen Programmatically in Android
Endless Scrolling Listview Not Working
Is There an Advantage to Running Jruby If You Don't Know Any Java
Java or Python for Natural Language Processing
What Is the Easiest Way to Parse an Ini File in Java
Is Dalvik's Memory Model the Same as Java'S
Click Is Not Working on the Listitem Listview Android
Firebase Database Points to Wrong Database Url
How to Make Edittext Not Focused When Creating Activity
How to Crop a Bitmap for Imageview