当我运行react-native链接时,react-native链接无法正常工作

时间:2019-06-06 03:55:28

标签: react-native

enter image description here,当我发短信react-native link react-native-gesture-handler时,它告诉我:

  

rnpm-install ERR! ERRPACKAGEJSON找不到软件包。您确定这是一个React Native项目吗?

在D:\ egame_android \ egame \ android \ app \ src \ debug \ AndroidManifest.xml中找不到包名称

  

错误:在D:\ egame_android \ egame \ android \ app \ src \ debug \ AndroidManifest.xml中找不到包名称       在Object.projectConfigAndroid [作为projectConfig](D:\ egame_android \ egame \ node_modules \ react-native \ local-cli \ core \ android \ index.js:46:11)       在Object.keys.forEach.key(D:\ egame_android \ egame \ node_modules \ react-native \ local-cli \ core \ index.js:100:36)       在Array.forEach()       在Object.getProjectConfig(D:\ egame_android \ egame \ node_modules \ react-native \ local-cli \ core \ index.js:99:28)       在Object.link [作为功能](D:\ egame_android \ egame \ node_modules \ react-native \ local-cli \ link \ link.js:121:22)       然后在Promise.resolve.then(D:\ egame_android \ egame \ node_modules \ react-native \ local-cli \ cliEntry.js:117:22)'

1 个答案:

答案 0 :(得分:0)

首先,在终端中运行以下命令:

cd <your_project_name>

然后运行命令react-native link react-native-gesture-handler