0
votes

I am trying to use the Cordova Build task in order to build an Ionic 2 app for android however i am receiving the following error.

TypeError: cordovaProject.projectConfig.getFileResources is not a function

The configuration i am using is as follows:

Platform: android Configuration: Release Target Archives: Cordova Version: 6.3.1

I have found this error mentioned on here before: Cordova Error using Cordova-Android 6.2.0 - getFileResources is not a function

However the accepted answer is not implementable within visual studio team services as far as i am concerned.

The application is known to build successfully with the following configuration: Cordova CLI: 6.3.1

Gulp version: CLI version 1.2.2

Gulp local:

Ionic Framework Version: 3.3.0

Ionic CLI Version: 2.1.1

Ionic App Lib Version: 2.1.1

Ionic App Scripts Version: 1.3.7

OS:

Node Version: v7.8.0

NPM: 4.2.0

Any help would be GREATLY appreciated.

2
Do you solve this issue with 7.0.1 Cordova?starian chen-MSFT
unfortunately not, time pressure got the better of me so i decided to use ionic commands to build the projectCharles Webb
You can share the detail build log here.starian chen-MSFT

2 Answers

0
votes

I can reproduce this issue with Cordova 6.3.1, using 7.0.1 version instead, it works fine.

0
votes

In VS 2015 Cordova project I got the same error while doing iOS remote build.

Simply deleting the following line of code from the config.xml file (VS 2015 Cordova project) solved the issue for me.

<engine name="ios" spec="^4.4.0" />

May help someone.