Unity 嵌入 React-Native 菜鸟教程(一)

这篇教程专注于Android平台,介绍了如何在Unity中整合React-Native。首先,创建了一个React-Native工程,然后解决可能出现的错误,如'Geo::GetiOSAppDocumentsDir()'。在使用RN版本0.59.9的情况下,编写了界面文件APP.js,并成功展示了运行效果。
摘要由CSDN通过智能技术生成
  • 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值