android - 如何解决 native Android 上的此打包程序错误

标签 android node.js android-studio npm react-native

你好,我是 Android 上的原生 React 新手。正在做示例应用程序

提到这个:

http://blog.couchbase.com/2015/november/getting-started-with-react-native-android-and-couchbase-lite

在 npm start 之后出现这个错误:

npm ERR! Linux 3.16.0-70-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.0.0
npm ERR! npm  v3.9.0
npm ERR! code ELIFECYCLE
npm ERR! react_sample@1.0.0 start: `node_modules/react-native/packager/packager.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the react_sample@1.0.0 start script 'node_modules/react-native/packager/packager.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react_sample package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node_modules/react-native/packager/packager.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs react_sample
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls react_sample
npm ERR! There is likely additional logging output above.

任何人都可以知道 packager.sh 中的问题是什么,或者是 cli.js 中的问题。我还注册了 npm & 如果我运行 app Build success full 但没有得到输出index.android.js 到底是什么。请任何人帮助我在 Android 上没有合适的解决方案

最佳答案

您很可能已经在其他地方运行了打包程序...运行这些命令。

$ lsof -n -i4TCP:8081

您应该得到返回的进程 ID (PID)。使用返回的 ID 运行下一个命令。

$ kill -9 <PID>

现在尝试运行 npm start再次。

关于android - 如何解决 native Android 上的此打包程序错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37186543/

相关文章:

java - 如何用JSoup进行分页

Android Studio Gradle 错误 "Multiple dex files define..."

android - ClassNotFoundException : com. google.android.gms.maps.MapFragment 与 AndroidStudio

javascript - Particles.js 在 .html 文件中有效,但在 .ejs 文件中无效

javascript - Mongoose .save() 和使用 update() 之间的区别

android - 如何让 Android Studio 指向我的 SDK 源代码?

android - 在Android 4.1.2(Jelly Bean)上安装数字证书

用于拖放操作的 Android Canvas 与 GLSurfaceView

Android 从 URL 下载图像并在 Imageview 中显示

javascript - 如何使用 sinon stub aws s3 上传