我正在运行“ Ionic build android”命令,并出现以下错误。
cordova-android-support-gradle-release.pre-prepare:将自定义版本'27。+'写入C:\ Welfare_Research_2009 \ Development \ EC \ Main \ LmpIonic \ platforms \ android \ build.gradle
cordova-android-support-gradle-release.prepare:编写自定义版本 “ 27. +”到
C:\ Welfare_Research_2009 \ Development \ EC \ Main \ LmpIonic \ platforms \ android \ cordova-android-support-gradle-release \ properties.gradle
Discovered plugin “call-number” in config.xml. Adding it to the project
Failed to restore plugin “call-number” from config.xml. You might need to try adding it again. Error: SyntaxError: Unexpected token in JSON at position 0
(node:20228) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token in JSON at position 0
My Ionic Info is as below
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.0
我没有运气试图从config.xml中删除插件。
对此有任何更多想法/建议,将不胜感激。
答案 0 :(得分:1)
答案 1 :(得分:0)
我在Cordova上的Android版本遇到了类似的问题。解决方案是安装gradle插件-您可能具有与ionic类似的插件。 Cordova插件为:cordova-android-support-gradle-release
答案 2 :(得分:0)
如果您尝试删除并重新添加该插件,则直接在config.xml中进行操作可能不是最佳方法。试试这些:
ionic cordova plugin remove call-number
ionic cordova plugin add call-number
在Cordova构建问题中偶尔需要清除其他内容也很常见: