React Native ART 库导致应用程序崩溃



如果我在 App.js 中使用此代码创建一个新的空 react-native 项目,应用程序将崩溃,而不会提供任何错误。

import React from 'react'
import { ART, View } from 'react-native'
const { Surface, Group, Shape } = ART
export default class App extends React.Component {
    render(){
        return (
            <View>
                <Surface width={200} height={100}>
                    <Group x={0} y={0}>
                        <Shape
                            d={"M-68.9646319937036,-29.476762610114324A75,75,0,0,1,-49.345310456503256,-56.48044206582762L-20.635195356782273,-21.775874553905552A30,30,0,0,0,-27.086713440010442,-12.896121704557451Z"}
                            stroke={"#2ca02c"}
                            strokeWidth={3}
                        />
                    </Group>
                </Surface>
            </View>
        )
    }
}

我是否错误地使用了艺术库?我也试过

react-native link art

但它没有用。

Packages:
  react-native: 0.49.3
  react: 16.0.0-beta.5
Target Platform: Android Emulator - Nexus_5x_API_26_x86

您可以通过在 AVD 属性中使用软件图形仿真来解决此问题

最新更新