Код: Выделить всё
import {
ViroBox,
ViroARScene,
ViroARSceneNavigator,
} from "@reactvision/react-viro";
import { StyleSheet, TouchableOpacity, TouchableWithoutFeedback } from "react-native";
const HelloWorldSceneAR = () => {
return (
{console.log("Clicked")}} />
);
};
export default () => {
return (
);
};
var styles = StyleSheet.create({
f1: { flex: 1 }
});
Код: Выделить всё
Exception thrown while executing UI block: -[VRTBox setOnClick:]: unrecognized selector sent to instance 0x111595d00
Я также пробовал это:
Код: Выделить всё
{console.log("Clicked")}}>
Код: Выделить всё
Exception thrown while executing UI block: -[RCTView setSuperview:]: unrecognized selector sent to instance 0x1115868e0
Код: Выделить всё
{console.log("Clicked")}}>
Код: Выделить всё
Exception thrown while executing UI block: -[VRTBox setOnClick:]: unrecognized selector sent to instance 0x111595d10
А это мой package.json
Код: Выделить всё
{
"name": "ViroStarterKit",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@reactvision/react-viro": "^2.41.4",
"react": "18.2.0",
"react-native": "0.73.3"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.73.20",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.4",
"@react-native/typescript-config": "0.73.1",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.2.0",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... o-instance