小编use*_*014的帖子

React Native - 位置“绝对”在 Android 中不起作用

不知何故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)

android react-native

6
推荐指数
1
解决办法
2万
查看次数

android 设备上的 react-native-maps 空白

React Native 在我的 android 设备上是空白的。它只是一个带有谷歌标志的灰色屏幕。与React-native-maps Blank page Only google logo 不同,它在模拟器上运行,但不在真实设备上运行。

我在网上搜索了这个问题:

  • API应该没问题
  • 样式表没问题
  • 它正在开发 genymotion 模拟器
  • 在 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)

google-maps react-native react-native-maps

5
推荐指数
3
解决办法
7028
查看次数

KERAS“ sparse_categorical_crossentropy”问题

输入为1.0或0.0。当我尝试用模型和sparse_categorical_crossentropy损失进行预测时,我得到如下信息: [[0.4846592 0.5153408]]

我怎么知道它预测什么类别?

python machine-learning loss keras tensorflow

2
推荐指数
1
解决办法
837
查看次数