react-native 報錯記錄

Warning: Failed child context type: Invalid child context virtualizedCell.cellKey of type number supplied to CellRenderer, expected string. #18291

keyExtractor={(item, index) => index.toString()}                         

加個toString()

在調(diào)用相機或相冊的時候,報錯Error: Missing camera or camera roll permission.

expo =>27.0.1

  • 解決方法:把授權(quán)相機和相冊都調(diào)一遍
showCamera = async () => {
        const { status } = await Permissions.askAsync(Permissions.CAMERA);
        const cameraRollPermission = await Permissions.askAsync(Permissions.CAMERA_ROLL);
        if (status === 'granted' && cameraRollPermission.status) {
            let result = await ImagePicker.launchCameraAsync({
                allowsEditing: true,
                aspect: [4, 3],
            });
            let file = { uri: result.uri, type: 'multipart/form-data', name: 'image.jpg' };
            if (!result.cancelled) {
               ......
            }
        }
    }

在安卓上 overFlow:hidden 需要加個zIndex:-1

Module @babel/runtime/helpers/interopRequireDefault does not exist in the Haste module map

-解決方法:

npm install --save-dev @babel/core
npm install --save-dev @babel/runtime
npm add @babel/runtime
npm install
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,862評論 0 10
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,628評論 19 139
  • "Unterminated string literal.": "未終止的字符串文本。", "Identifier...
    兩個心閱讀 8,559評論 0 4
  • 借用經(jīng)濟權(quán)威人士--中央財經(jīng)辦主任劉鶴的觀點,未來中國經(jīng)濟既不是U形,也不是V形而是L形。無論什么行,說明中國模式...
    stoneonly閱讀 197評論 0 0
  • 我常常問他,永遠有多遠?他說,永遠就是我和你的距離??墒牵矣X得在時光漸漸的逃離中,我和他的距離變得越來越遠,直至...
    潤寒閱讀 404評論 0 3

友情鏈接更多精彩內(nèi)容