当我尝试在react-navtive-device-info的帮助下打印设备的MAC地址时。
"DeviceInfo.getMACAddress();"
它显示一个错误,如:
“未定义不是对象(正在评估RNDeviceinfo.getMacAddress)”
import React from 'react';
import {
Image,
Platform,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
StatusBar,
Dimensions,
LayoutAnimation,
Alert,
Linking,
} from 'react-native';
import { WebBrowser } from 'expo';
import { BarCodeScanner, Permissions } from 'expo';
import { MonoText } from '../components/StyledText';
import DeviceInfo from 'react-native-device-info';
please see this image for the linked library to the native modules
答案 0 :(得分:0)
您似乎没有将库正确链接到本机模块。
如果您使用过$this->db->insert('signatures', $data);
而没有用,则应该遵循手动方法。
请参考this进行手动链接