-
React-Native 新建工程
这里写的是安卓的教程,IOS的看这里 https://www.jianshu.com/p/184f3d1e01f6
如果有报下面的错误,看一下这里 https://blog.csdn.net/shenhuaikun/article/details/77918174
Undefined symbols for architecture arm64:"Geo::GetiOSAppDocumentsDir()"
(这边我用到到RN版本是0.59.9的)
react-native init RnToAndroid --version 0.59.9
新建你的界面文件编写以下内容~~我比较懒就直接用APP.js写了~~
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, NativeModules, Button} from 'react-native';
const instructions = Platform