when i open a project from github ,the folder from res folder has a xml resource product_famliy.xml but android studio has a error:
Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
E:\googledownload\PaperPlane-master\app\src\main\res\font\product_family.xml
Error:Error: Unsupported type 'font'
Error:Execution failed for task ':app:mergeDebugResources'.
> E:\googledownload\PaperPlane-master\app\src\main\res\font\product_family.xml: Error: Unsupported type 'font'
Information:BUILD FAILED
Information:Total time: 21.311 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<font
android:fontStyle="normal"
android:fontWeight="400"
android:font="@font/product_sans_regular"
app:fontStyle="normal"
app:fontWeight="400"
app:font="@font/product_sans_regular"/>
<font
android:fontStyle="italic"
android:fontWeight="400"
android:font="@font/product_sans_italic"
app:fontStyle="italic"
app:fontWeight="400"
app:font="@font/product_sans_italic"/>
</font-family>
To change font type purely with HTML, use the CSS font-family property. Set it to the value you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a paragraph, heading, button, or span tag.
A font stack is a list of fonts in the CSS font-family declaration. The fonts are listed in order of preference that you would like them to appear in case of a problem, such as a font not loading.
font-family is a CSS property, so it belongs neither to the html nor the body tag.
The font-family property can hold several font names as a "fallback" system. If the browser does not support the first font, it tries the next font. There are two types of font family names: family-name - The name of a font-family, like "times", "courier", "arial", etc.
I guess you need Android Studio 3.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With