我是靠谱客的博主 靓丽手套,最近开发中收集的这篇文章主要介绍React Native 笔记TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions'),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions')

android/app/build.gradle搜索

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]
将其更改为project.ext.react = [
    enableHermes: false,  // clean and rebuild if changing
]

 并在MainApplication.java文件中将这两行添加到顶部

import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
并添加此功能@Override
protected JSIModulePackage getJSIModulePackage() { 
      return new ReanimatedJSIModulePackage(); 
    }

屏幕截图

 

 在bable.config.js文件中添加这些,像这样的行

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    "react-native-reanimated/plugin",
  ],
};

index.js

import 'react-native-gesture-handler'

 

最后

以上就是靓丽手套为你收集整理的React Native 笔记TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions')的全部内容,希望文章能够帮你解决React Native 笔记TypeError: undefined is not an object (evaluating 'InnerNativeModule.installCoreFunctions')所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(55)

评论列表共有 0 条评论

立即
投稿
返回
顶部