gpt4 book ai didi

android - 错误 ENOENT : no such file or directory, 打开 'app/src/main/AndroidManifest.xml'

转载 作者:行者123 更新时间:2023-11-29 02:20:09 25 4
gpt4 key购买 nike

我确实运行程序 react-native 以使用代码 react-native run-android 和 npm start 但程序错误文件 AndroidManifest,如果有文件。

error ENOENT: 没有这样的文件或目录,打开 'app/src/main/AndroidManifest.xml'包.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)

enter image description here enter image description here

最佳答案

  1. (在项目目录中)mkdir android/app/src/main/assets
  2. react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/应用程序/src/main/res
  3. react-native run-android

"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"
}
}

关于android - 错误 ENOENT : no such file or directory, 打开 'app/src/main/AndroidManifest.xml',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56684118/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com