不知何故position: 'absolute'在Android中不起作用。它适用于 iOS,但在 Android 中无法渲染。有人知道如何在Android设备上设置位置:“绝对”?
Button: {
position: "absolute",
right: 0,
top: 0,
borderRadius: 4,
borderWidth: 2,
width: 100,
height: 40,
borderColor: 'red',
backgroundColor: "rgb(72, 120, 166)",
}
Run Code Online (Sandbox Code Playgroud) React Native 在我的 android 设备上是空白的。它只是一个带有谷歌标志的灰色屏幕。与React-native-maps Blank page Only google logo 不同,它在模拟器上运行,但不在真实设备上运行。
我在网上搜索了这个问题:
在 android 虚拟设备上工作
完美地在 Expo 上工作,但当我从 Playstore 下载应用程序时就不行了。AndroidManifest.xml 中的元数据如下所示:
这是 mapView 的样子:
` <MapView
showsUserLocation={false}
style={styles.map}
provider='google'
ref={ref => { map3 = ref; }}
onMapReady = { this.onMapReady }
initialRegion={this.state.region}
>
<Marker
image={logo}
coordinate={this.state.coordinate}
/>
</MapView>`
Run Code Online (Sandbox Code Playgroud)..和风格:
`const styles = StyleSheet.create({
mapContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#ecf0f1',
},
map: {
flex: 1,
borderRadius: 4,
width,
height,
zIndex: …Run Code Online (Sandbox Code Playgroud) 输入为1.0或0.0。当我尝试用模型和sparse_categorical_crossentropy损失进行预测时,我得到如下信息:
[[0.4846592 0.5153408]]。
我怎么知道它预测什么类别?