不变违规:[2365,“ RCTView”,11,{“ position”:“绝对”,“ width”:“ << Infinity >>”,“ height”:4不能用作本机方法参数

时间:2020-09-18 13:51:14

标签: react-native expo

每次加载用于工作的本机页面时,我都会遇到错误。我删除了所有100%的宽度,实际上我尝试删除所有宽度均未成功。尝试删除所有样式。更新的EXPO对SDK 38的本机反应不成功。代码中没有宽度被分割。试图删除下面列出的外部组件也没有成功。 有人知道怎么了吗?

Invariant Violation: [2365,"RCTView",11,{"position":"absolute","width":"<<Infinity>>","height":4,"backgroundColor":4278221567,"bottom":0,"left":0}] is not usable as a native method argument

This error is located at:
    in NavigationContainer (at UserScreenNavigator.native.jsx:76)
    in UserScreenNavigator (at UserScreenNavigator.native.jsx:83)
    in WithRoutesComponent (at AuthBase.jsx:11)
    in WithUser (created by Query)
    in Query (created by Apollo(WithUser))
    in Apollo(WithUser) (created by Query)
    in Query (created by Apollo(Apollo(WithUser)))
    in Apollo(Apollo(WithUser)) (at client-react/index.native.jsx:153)
    in MainScreenNavigator
    in DataRootComponent (created by Context.Consumer)
    in ApolloConsumer (created by withApollo(DataRootComponent))
    in withApollo(DataRootComponent) (created by Main)
    in PageReloader (at access/index.tsx:49)
    in AuthPageReloader (created by Main)
    in ApolloProvider (at App.tsx:50)
    in Provider (at App.tsx:49)
    in I18nextProvider (at i18nModule.native.tsx:15)
    in RCTView (at Root.js:14)
    in Root (at connectStyle.js:392)
    in Styled(Root) (at Root.jsx:8)
    in Root (at i18nModule.native.tsx:14)
    in I18nProvider (at i18nModule.native.tsx:41)
    in Main (created by AwakeInDevApp)
    in RCTView (created by AwakeInDevApp)
    in AwakeInDevApp (created by ExpoRoot)
    in RNCAppearanceProvider (at src/index.tsx:70)
    in AppearanceProvider (created by ExpoRoot)
    in ExpoRoot (at renderApplication.js:45)
    in RCTView (at AppContainer.js:109)
    in RCTView (at react-native-root-siblings/index.js:32)
    in RootSiblingsWrapper (created by PatchedProviderComponent)
    in DevAppContainer (created by PatchedProviderComponent)
    in PatchedProviderComponent (at AppContainer.js:124)
    in RCTView (at AppContainer.js:135)
    in AppContainer (at renderApplication.js:39)

invariant
    browser.js:38:14
enqueueNativeCall
    MessageQueue.js:307:15
nonPromiseMethodWrapper
    NativeModules.js:139:8
createInstance
    ReactNativeRenderer-dev.js:4269:2
completeWork
    ReactNativeRenderer-dev.js:16949:39
completeUnitOfWork
    ReactNativeRenderer-dev.js:20912:27
performUnitOfWork
    ReactNativeRenderer-dev.js:20882:29
workLoopSync
    ReactNativeRenderer-dev.js:20848:38
performSyncWorkOnRoot
    ReactNativeRenderer-dev.js:20456:22
performSyncWorkOnRoot
    [native code]:0
runWithPriority$argument_1
    ReactNativeRenderer-dev.js:5703:31
unstable_runWithPriority
    scheduler.development.js:818:23
flushSyncCallbackQueueImpl
    ReactNativeRenderer-dev.js:5698:21
flushSyncCallbackQueue
    ReactNativeRenderer-dev.js:5686:28
scheduleUpdateOnFiber
    ReactNativeRenderer-dev.js:19845:30
dispatchAction
    ReactNativeRenderer-dev.js:11880:16
dispatchAction
    [native code]:0
<unknown>
    src.bundle?platform=ios&dev=true&minify=false&hot=false:390678:34
_callTimer
    JSTimers.js:135:14
callTimers
    JSTimers.js:387:16
__callFunction
    MessageQueue.js:425:19
__guard$argument_0
    MessageQueue.js:112:6
__guard
    MessageQueue.js:373:10
callFunctionReturnFlushedQueue
    MessageQueue.js:111:4
callFunctionReturnFlushedQueue
    [native code]:0







import React, { useState, useEffect, useRef, useCallback,useReducer } from 'react';
import {
  View,
  StyleSheet,
  SafeAreaView,
  TouchableOpacity,
  Platform,
  TextInput,
  Dimensions,
  Keyboard
} from 'react-native';
import PropTypes from 'prop-types';
import { withFormik } from 'formik';
import { translate } from '@gqlapp/i18n-client-react';
import { required, validate } from '@gqlapp/validation-common-react';
import moment from 'moment-timezone';
import { DataTable } from 'react-native-paper';
import { Autocomplete } from 'react-native-dropdown-autocomplete';
import { FontAwesome } from '@expo/vector-icons';
import {
  Card,
  CardItem,
  Button,
  Textarea,
  Body,
  Thumbnail,
  Tab,
  Tabs,
  TabHeading,
  Text,
  Toast,
  Spinner
} from 'native-base';
import { Row, Col, Grid } from 'react-native-easy-grid';
import NumericInput from 'react-native-numeric-input';
import { TextInputMask } from 'react-native-masked-text';
import {
  resolveMaskValues,
  getAmountInMinimalUnit,
  getAmountString,
  createMask,
  generateReceivedSuggestions
} from '@gqlapp/core-common/common';
import RegisterHistoryForm from '@gqlapp/registerhistory-client-react/components/RegisterHistoryForm.native';
import { Table, TableWrapper, Cell, Row as Rowx } from 'react-native-table-component';
import { FormView } from '@gqlapp/look-client-react-native';
import { FlatGrid } from 'react-native-super-grid';
import Modal, { ModalFooter, ModalButton, ModalContent, ModalTitle } from 'react-native-modals';
import {
  calculateCartTotals,
  payCart,
  updateCartItem,
  addItemToCart,
  updateReceivedInput,
  completeSale,
  addVariantItem,
  updateVariantSelection,
  removeItemFromCart
} from './SaleFormCommon';
import CheckBox from 'react-native-checkbox-heaven';

0 个答案:

没有答案