如何解决这个错误?离子3

时间:2018-07-12 05:37:00

标签: android ionic-framework ionic3

  

(节点:10624)UnhandledPromiseRejectionWarning:错误:源路径不正确   不存在:google-services.json       在updatePathInternal(D:\ ion \ Event \ platforms \ android \ cordova \ node_modules \ cordova-common \ src \ FileUpdater.js:145:19)       在D:\ ion \ Event \ platforms \ android \ cordova \ node_modules \ cordova-common \ src \ FileUpdater.js:223:19       在Array.forEach()       在Object.updatePaths(D:\ ion \ Event \ platforms \ android \ cordova \ node_modules \ cordova-common \ src \ FileUpdater.js:221:33)       在updateFileResources(D:\ ion \ Event \ platforms \ android \ cordova \ lib \ prepare.js:431:17)       在D:\ ion \ Event \ platforms \ android \ cordova \ lib \ prepare.js:51:9       在_fulfilled(D:\ ion \ Event \ platforms \ android \ cordova \ node_modules \ q \ q.js:854:54)       在D:\ ion \ Event \ platforms \ android \ cordova \ node_modules \ q \ q.js:883:30       在Promise.promise.promiseDispatch(D:\ ion \ Event \ platforms \ android \ cordova \ node_modules \ q \ q.js:816:13)       在D:\ ion \ Event \ platforms \ android \ cordova \ node_modules \ q \ q.js:624:44   (节点:10624)UnhandledPromiseRejectionWarning:未处理的诺言   拒绝。该错误是由抛出异步内部引起的   没有捕获块或拒绝承诺   未使用.catch()处理。 (拒绝ID:1)(节点:10624)[DEP0018]   DeprecationWarning:已弃用未处理的承诺拒绝。在   未来,未处理的承诺拒绝将终止   具有非零退出代码的Node.js进程。


ionic cordova插件添加cordova-plugin-fcm

  

cordova插件添加cordova-plugin-fcm --save   插件“ cordova-plugin-fcm”已安装在Android上。

将cordova-plugin-fcm添加到package.json

将“ cordova-plugin-fcm”的插件信息保存到config.xml

(node:11704) UnhandledPromiseRejectionWarning: Error: cordova-plugin-fcm: You have installed platform android but file 'google-services.json' was not found in your Cordova project root folder.
    at Object.<anonymous> (D:\ion\Event\plugins\cordova-plugin-fcm\scripts\fcm_config_files_process.js:84:9)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at runScriptViaModuleLoader (C:\Users\DINESH\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:178:20)
    at runScript (C:\Users\DINESH\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:164:16)
(node:11704) 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)
(node:11704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.` <platform name="android">
        <resource-file src="google-services.json" 
         target="platforms/android/app/google-services.json" />
    </platform>`

0 个答案:

没有答案