react-native - 更新由管理的视图的属性“背景颜色”时出错:RNCardView - React Native
问题描述
我在 React Native 中使用 ios 应用程序没有任何问题,但在 android 上出现以下错误。RGB 颜色定义是必需的。Rgba 不支持颜色支持吗?
ext {
buildToolsVersion = "29.0.1"
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 26
supportLibVersion = "29.0.1"
}
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
render() {
return (
<ScrollView>
<Image source={require('../images/HEADER.png')} style={styles.imageBanner}>
</Image>
<View style={styles.container}>
<CardView cardElevation={4}
maxCardElevation={4}
radius={10}
backgroundColor={'#ffffff'}>
<View style={{padding:10}}>
<View>
<HTML html={this.state.dataIcerik[0]} />
</View>
container: {
flex: 1,
paddingLeft:20,
paddingRight:20,
paddingTop: 10,
backgroundColor: 'rgba(248, 248, 248, 1.0)',
解决方案
推荐阅读
- c# - 用值展平表达式参数
- javascript - 在不考虑时区的情况下将字符串转换为日期 - 打字稿
- java - 使用 ContentResolver 和 openInputStream() (Android)
- excel - 使用 COUNTIF / VLOOKUP 进行库存管理
- ruby - 发生 Ruby 异常:在 Logstash ruby 过滤器中没有将 String 隐式转换为 Integer
- python - 如何将日期列与日期进行比较并添加文本列?
- c# - 如何在 C# 中的视图中绑定视图模型中对象的 IEnumerable 列表
- c# - 在另一个应用程序中更改文本 NumericUpDown
- android - 口味、包名称和签名
- html - 如何使div框下的段落居中?