当我尝试在Ionic中安装Facebook插件
ionic cordova插件添加cordova-plugin-facebook4 --variable APP_ID =“ xxxxxxxx”-变量APP_NAME =“ fblogin”
然后抛出错误
Failed to install 'cordova-plugin-facebook4': Error: ENOENT: no such file or directory, open 'D: \product\project-1\frontend\platforms\android\AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (D:\product\project-1\frontend\platforms\android\cordova\node _modules\cordova-common\src\util\xml-helpers.js:180:27)
at new AndroidManifest (D:\product\project-1\frontend\platforms\android\cordova\lib\AndroidM anifest.js:29:20)
at AndroidProject.getPackageName (D:\product\project-1\frontend\platforms\android\cordova\li b\AndroidProject.js:99:12)
at Api.addPlugin (D:\product\project-1\frontend\platforms\android\cordova\Api.js:223:57)
at handleInstall (C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova- lib\src\plugman\install.js:594:10)
at C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman \install.js:357:28
at _fulfilled (C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:854: 54)
at self.promiseDispatch.done (C:\Users\hi\AppData\Roaming\npm\node_modules\cordova\node_modu les\q\q.js:883:30)
ENOENT: no such file or directory, open 'D:\product\project-1\frontend\platforms\android\Android Manifest.xml'
我尝试将其安装在Android平台v6.4和v7.1.1上。我该如何解决这个问题?
答案 0 :(得分:0)
您是否已检查文件夹的权限,是否尝试过使用管理员权限?也许只是许可问题。
答案 1 :(得分:0)
似乎与构建,权限或其他问题有关。尝试以下
使用命令
删除平台ionic cordova platform rm android
确保您拥有正确的权限
chmod 700 <your-directory>
添加插件,然后添加平台
ionic cordova platform add android
添加插件