我确实运行程序react-native来使用代码react-native run-android和npm start,但是程序错误文件AndroidManifest,如果有的话。
错误消息:没有此类文件或目录,请打开“ app / src / main / AndroidManifest.xml” package.json
{
"name": "react-native-inappbrowser-reborn",
"version": "2.0.4",
"description": "InAppBrowser for React Native",
"main": "index.js",
"readmeFilename": "README.md",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "index.js",
},
"typings": "./index.d.ts",
"repository": {
"type": "git",
"url": "git@github.com:proyecto26/react-native-inappbrowser.git"
},
"bugs": {
"url": "https://github.com/proyecto26/react-native-inappbrowser/issues"
},
"keywords": [
"react-native",
"in",
"app",
"browser",
"inappbrowser",
"in-app-browser"
],
"author": "Juan David Nicholls Cardona",
"homepage": "https://github.com/proyecto26/react-native-inappbrowser",
"license": "MIT",
"peerDependencies": {
"react-native": ">=0.55.0"
},
"dependencies": {
"invariant": "^2.2.4",
"react-native": "^0.59.9"
},
"devDependencies": {
"babel-core": "^6.26.0",
"flow-bin": "^0.80.0"
}
}
向上数据
This error is caused by `hasteImpl` returning the same name for different files.
at setModule (F:\react-hr-and-ess\node_modules\metro\node_modules\jest-haste-map\build\index.js:569:17)
at workerReply (F:\react-hr-and-ess\node_modules\metro\node_modules\jest-haste-map\build\index.js:641:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:16876) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
答案 0 :(得分:0)
在"test": "echo \"Error: no test specified\" && exit 1",
之后添加逗号
在"start": "index.js"
之后删除逗号
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "index.js"
},
更正json
{
"name": "react-native-inappbrowser-reborn",
"version": "2.0.4",
"description": "InAppBrowser for React Native",
"main": "index.js",
"readmeFilename": "README.md",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "index.js"
},
"typings": "./index.d.ts",
"repository": {
"type": "git",
"url": "git@github.com:proyecto26/react-native-inappbrowser.git"
},
"bugs": {
"url": "https://github.com/proyecto26/react-native-inappbrowser/issues"
},
"keywords": [
"react-native",
"in",
"app",
"browser",
"inappbrowser",
"in-app-browser"
],
"author": "Juan David Nicholls Cardona",
"homepage": "https://github.com/proyecto26/react-native-inappbrowser",
"license": "MIT",
"peerDependencies": {
"react-native": ">=0.55.0"
},
"dependencies": {
"invariant": "^2.2.4",
"react-native": "^0.59.9"
},
"devDependencies": {
"babel-core": "^6.26.0",
"flow-bin": "^0.80.0"
}
}
答案 1 :(得分:0)
这也帮助了我。如果有人像我一样,
这可能也有帮助。 enter link description here
我的问题出在我安装qs.js并在安装过程中从git bash窗口中停止它之后(我是通过$ path用户身份登录,而不是显式管理) 我最终也完成了react-native-clean-project,但这没有帮助解决这个特定问题
否:Win 10,Android模拟器,React-Native-Debugger 0.10.1