Path must be a string. Received undefined after upgrading my cordova to 7.1.0

孤街醉人 提交于 2021-02-07 06:05:43

问题


E:\ionic template\gb\IonicMaterialDesign>cordova platform add android

Using cordova-fetch for cordova-android@~6.3.0 Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.grabhalal.ghadmin Name: gb Activity: MainActivity Android target: android-26 Subproject Path: CordovaLib Android project created with cordova-android@6.3.0 Installing

"cordova-plugin-app-event" for android Installing

"cordova-plugin-background-mode" for android android-sdk version check failed ("E:\ionic template\gb\IonicMaterialDesign\platforms\android\cordova\android_sdk_version"), continuing anyways.

Plugin dependency "cordova-plugin-device@1.1.2" already fetched, using that version. Installing

"cordova-plugin-device" for android Installing

"cordova-plugin-crosswalk-webview" for android Subproject Path:

CordovaLib After much discussion and analysis of the market, we have decided to discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20. So the minSdkVersion of Cordova project is configured to 16 by default.

`Dependent plugin "cordova-plugin-device"

already installed on android.Installing`

"cordova-plugin-globalization" for android Installing

"cordova-plugin-inappbrowser" for android Installing

"cordova-plugin-splashscreen" for android Installing

`"cordova-plugin-statusbar" for android Installing

"cordova-plugin-whitelist" for android This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Installing "cordova-plugin-x-socialsharing" for android Subproject

Path: CordovaLib Installing "cordova-sqlite-storage" for android installing external dependencies via npm npm install of external

dependencies ok

Error: Path must be a string. Received undefined


回答1:


the same thing happened with me after the update, and in the end, what solved it was removing the "config-file" tags from my config.xml




回答2:


Using the Cordova Custom Config plugin instead of <config-file> elements fixed this issue for me.



来源:https://stackoverflow.com/questions/46987856/path-must-be-a-string-received-undefined-after-upgrading-my-cordova-to-7-1-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!