无法读取属性&manifest'离子中的未定义错误 [英] Cannot read property 'manifest' of undefined Error in Ionic

查看:120
本文介绍了无法读取属性&manifest'离子中的未定义错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Firebase登录Facebook.我已经安装了所需的所有库并完成了所需的配置.尽管如此,每当我尝试启动我的应用程序时,都会出现此错误:

I am trying to login Facebook with Firebase. I have installed all the libraries required and completed the required configuration. Still, whenever I try to start my app it is giving me this error:

(node:11160) UnhandledPromiseRejectionWarning: TypeError: Cannot read 
property 'manifest' of undefined

at removeOldOptions (C:\Users\Dell\Desktop\firebaseapp\plugins\cordova- universal-links-plugin\hooks\lib\android\manifestWriter.js:48:32)ished in 37.33 s
at Object.writePreferences 

(C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links- 
 plugin\hooks\lib\android\manifestWriter.js:27:19)
at activateUniversalLinksInAndroid 

(C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:65:25)
at C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:45:11
at Array.forEach (<anonymous>)
at run (C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:41:17)
at module.exports (C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:18:3)
at runScriptViaModuleLoader (C:\Users\Dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:188:18)
at runScript (C:\Users\Dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:164:16)
(node:11160) 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: 1)

推荐答案

可以通过以下更改来解决:

只需转到Ionic中的以下文件

plugins/cordova-universal-links-plugin/hooks/lib/android/manifestWriter.js

plugins/cordova-universal-links-plugin/hooks/lib/android/manifestWriter.js

我通过如下更改pathToManifest来解决此问题:

var pathToManifest = path.join(cordovaContext.opts.projectRoot, 'platforms', 'android', 'cordovaLib', 'AndroidManifest.xml');

var pathToManifest = path.join(cordovaContext.opts.projectRoot,平台",'安卓','应用程序','src','主要的','AndroidManifest.xml');

var pathToManifest = path.join( cordovaContext.opts.projectRoot, 'platforms', 'android', 'app', 'src', 'main', 'AndroidManifest.xml');

这篇关于无法读取属性&manifest&amp;#39;离子中的未定义错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆