Reputation: 31
I am running “Ionic build android” command and getting below error.
cordova-android-support-gradle-release.after-prepare: Wrote custom version '27.+' to C:\Welfare_Research_2009\Development\EC\Main\LmpIonic\platforms\android\build.gradle
cordova-android-support-gradle-release.before-prepare: Wrote custom version '27.+' to
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
I tried to remove the plugin from config.xml with no luck.
Any more ideas/suggestions on this would be appreciated.
Upvotes: 1
Views: 1682
Reputation: 21
Upvotes: 1
Reputation: 3838
If you were trying to remove and re-add the plugin, doing it directly in the config.xml likely isn't the best way. Try these:
ionic cordova plugin remove call-number
ionic cordova plugin add call-number
It's also not too uncommon to need to clear out other things occasionally with cordova build issues:
Upvotes: 0
Reputation: 8794
I ran into a similar problem with my Android build on Cordova. The solution was to install a gradle plugin -- you might have the analogous for ionic. The Cordova plugin was: cordova-android-support-gradle-release
Upvotes: 1