我正在开发一个适用于Android和iOS的科尔多瓦应用程序与Visual Studio 2015更新3和最近我有一些问题为Android构建(iOS构建工作正常)。科尔多瓦为Android编译失败VS,但不是从控制台
当我从Visual Studio生成时出现以下错误(我正在使用诊断MSBuild输出,但这只是显示与错误相关的所有内容)。
1> No scripts found for hook "before_compile". (TaskId:25)
1> ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk (TaskId:25)
1> JAVA_HOME=c:\Program Files\Java\jdk1.8.0_131\ (TaskId:25)
1> Reading build config file: C:\apprep\build.json (TaskId:25)
1>16:58:37.536 1>
1>MSBUILD : cordova-build error : TypeError: undefined is not a function
1> TypeError undefined is not a function (TaskId:25)
1> Done executing task "MdaVsCli" -- FAILED. (TaskId:25)
但是,如果我运行该命令的命令cordova build android
提示它工作得很好。
我正在使用Cordova 7.0.1,节点6.11.0,npm 3.10.10,Java 1.8.0.131。
我已经尝试了无数解决方案来解决这个问题(卸载并重新安装工具和模块,缓存清理等)。我无法确定Cordova的Visual Studio工具有什么问题。我可以在某处找到其他日志记录,以帮助我认识到undefine is not a function
错误来自哪里?
是这个链接 - https://stackoverflow.com/questions/39084692/msbuild-cordova-build-error-typeerror-cannot-read-property-indexof-of-und适用于你? – Gandhi
是你的成功,如果你通过。 cordova CLI? – Gandhi
我没有列表中的空域。此外,我的错误是不同的。它是“未定义不是函数”。是的,当我从命令提示符运行'cordova build android'时,它运行良好,正如我已经提到的。 –