简体   繁体   English

在React Native中创建android debug build时出错

[英]Error creating android debug build in react native

Release build in my project is working fine. 我的项目中的发布版本运行正常。 Debug build with local server ( ip address ) is also working fine. 使用本地服务器(ip address)进行调试构建也可以正常工作。 But when I create debug build with main bundle main.jsbundle. 但是当我使用主捆绑包main.jsbundle创建调试版本时。 It is showing following error. 它显示以下错误。

React native version mismatch. 反应本机版本不匹配。

Javascript version 0.50.4 Javascript版本0.50.4

Native version 0.55.4 本机版本0.55.4

What I have tried : 我尝试过的

  1. watchman watch-del-all && react-native start --reset-cache. watchman watch-del-all && react-native开始-重置缓存。
  2. Restart npm start 重新启动npm start
  3. compile ("com.facebook.react:react-native:0.55.4") { force = true } // added force 编译(“ com.facebook.react:react-native:0.55.4”){force = true} //增加了强制
  4. Everything in this issue : https://github.com/facebook/react-native/issues/19259 此问题中的所有内容: https : //github.com/facebook/react-native/issues/19259

I've run into these problems before and what solved it for me was honestly to delete all of my libraries and npm install them again, the nodejs seems to be running a different version than react-native is and that's what is causing this issue. 我以前遇到过这些问题,老实说,为我解决的问题是删除我的所有库并再次npm install它们,nodejs似乎运行的版本与react-native不同,这就是导致此问题的原因。 Make sure your package.json has the correct version as well. 确保您的package.json也具有正确的版本。

You will need to compile using JS 0.50.4 instead of 0.55.4 compile ("com.facebook.react:react-native:0.50.4") { force = true } . 您将需要使用JS 0.50.4而不是0.55.4进行compile ("com.facebook.react:react-native:0.50.4") { force = true } I hope this my help 希望这对我有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native Android 构建,“错误:无法获得未知属性‘mergeResourcesProvider’” - React Native Android build, "ERROR: Could not get unknown property 'mergeResourcesProvider'" React Native 发布构建崩溃问题,但在调试时它工作正常 - React Native release build crash issue, but on debug it is working fine Android上的React Native无法找到构建工具 - React Native on Android failed to find Build Tools Android Studio React Native Build 失败 - Android Studio React Native Build fails 如何解决 react-native 上的构建错误? - How to resolve the build error on react-native? 创建反应本机初始化命令时出错 - Error during creating react native init command 通过 XMLHttpRequest 创建 Blob 的 React Native 错误 - React Native Error Creating Blobs via XMLHttpRequest 在 react-native run-android 的开发版本上出现错误“Task:app:processDebugResources FAILED” - Error "Task :app:processDebugResources FAILED" on dev build of react-native run-android React Native(Netflix App)Android构建错误-“在Connect(App)的上下文或道具中找不到'store'” - React Native (Netflix app) Android build error - “Could not find 'store' in either the context or props of Connect(App)” 我正在构建反应原生应用程序。 在 android 构建中出现一些错误 - I am building react native app . getitng some error in android build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM