I haved the same error, and i fixed the problem by changing version my nodes modules, my plugin cordova, version off android studio and many other stuff:
My conf below:
ANDROID STUDIO: 3.0.0
IONIC INFO :
@ionic/cli-utils : 1.13.1
ionic (Ionic CLI) : 3.13.2
global packages:
cordova (Cordova CLI) : not installed
local packages:
@ionic/app-scripts : 3.0.0
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.7.1
System:
Node : v6.11.0
npm : 5.5.1
OS : Windows 7
Misc:
backend : pro
PACKAGE.JSON :
"dependencies": {
"@angular/common": "4.4.3",
"@angular/compiler": "4.4.3",
"@angular/compiler-cli": "4.4.3",
"@angular/core": "4.4.3",
"@angular/forms": "4.4.3",
"@angular/http": "4.4.3",
"@angular/platform-browser": "4.4.3",
"@angular/platform-browser-dynamic": "4.4.3",
"@ionic-native/action-sheet": "4.3.1",
"@ionic-native/calendar": "4.3.1",
"@ionic-native/call-number": "4.3.2",
"@ionic-native/camera": "4.3.1",
"@ionic-native/core": "4.3.1",
"@ionic-native/fcm": "4.3.1",
"@ionic-native/file": "4.3.1",
"@ionic-native/file-transfer": "4.3.1",
"@ionic-native/geolocation": "4.3.1",
"@ionic-native/globalization": "4.3.1",
"@ionic-native/google-maps": "4.3.1",
"@ionic-native/ibeacon": "4.3.1",
"@ionic-native/launch-navigator": "4.3.1",
"@ionic-native/local-notifications": "4.3.1",
"@ionic-native/network": "4.3.2",
"@ionic-native/open-native-settings": "4.3.1",
"@ionic-native/splash-screen": "4.3.1",
"@ionic-native/status-bar": "4.3.1",
"@ionic/storage": "2.0.1",
"@types/node": "8.0.33",
"com.unarin.cordova.beacon": "^3.4.0",
"cordova-android": "^6.3.0",
"cordova-ios": "~4.3.1",
"cordova-open-native-settings": "^1.4.1",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-android-permissions": "^0.11.0",
"cordova-plugin-app-event": "^1.2.1",
"cordova-plugin-browsertab": "^0.2.0",
"cordova-plugin-buildinfo": "^1.1.0",
"cordova-plugin-calendar": "^4.6.0",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-customurlscheme": "^4.3.0",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-dialogs": "^1.3.3",
"cordova-plugin-fcm": "^2.1.2",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-file-transfer": "^1.6.3",
"cordova-plugin-geolocation": "^2.4.3",
"cordova-plugin-globalization": "^1.0.7",
"cordova-plugin-googlemaps": "^2.0.0",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-network-information": "^1.3.3",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-sqlite-2": "^1.0.4",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-universal-links-plugin": "^1.2.1",
"de.appplant.cordova.plugin.local-notification": "^0.8.5",
"firebase": "4.3.0",
"font-awesome": "4.7.0",
"ionic-angular": "3.7.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"mx.ferreyra.callnumber": "~0.0.2",
"node-js-marker-clusterer": "^1.0.0",
"p-queue": "2.2.0",
"pouchdb": "6.2.0",
"pouchdb-adapter-cordova-sqlite": "2.0.2",
"pouchdb-adapter-websql-core": "6.2.0",
"pouchdb-browser": "6.2.0",
"pouchdb-core": "6.2.0",
"promise-polyfill": "6.0.2",
"rxjs": "5.4.3",
"shortid": "2.2.8",
"sw-toolbox": "3.6.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.0.7",
"uuid": "^3.1.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.0.0",
"typescript": "2.3.4"
}
CONFIG.XML
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="FadeSplashScreen" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AndroidLaunchMode" value="singleTask" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<universal-links>
<ios-team-id value="YOUR_TEAM_ID" />
<host name="YOUR_DYNAMIC_LINK" scheme="https" />
<host name="YOUR_URL" scheme="https">
<path url="/__/auth/callback" />
</host>
</universal-links>
<allow-navigation href="http://localhost:8080/*" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="orientation" value="portrait" />
<engine name="ios" spec="~4.3.1" />
<engine name="android" spec="^6.3.0" />
<plugin name="cordova-plugin-console" spec="^1.0.7" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-android-permissions" spec="^0.11.0" />
<plugin name="cordova-plugin-globalization" spec="^1.0.7" />
<plugin name="de.appplant.cordova.plugin.local-notification" spec="^0.8.5" />
<plugin name="cordova-plugin-app-event" spec="^1.2.1" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-plugin-sqlite-2" spec="^1.0.4" />
<plugin name="com.unarin.cordova.beacon" spec="^3.4.0">
<variable name="NSBLUETOOTHPERIPHERALUSAGEDESCRIPTION" value="Give you access to iBeacons deployed in your city" />
</plugin>
<plugin name="cordova-plugin-actionsheet" spec="^2.3.3" />
<plugin name="cordova-plugin-camera" spec="^2.4.1">
<variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="This app need access to your photo library if you prefer use your own photo when submitting new POIs" />
</plugin>
<plugin name="cordova-plugin-device" spec="^1.1.6" />
<plugin name="cordova-plugin-file" spec="^4.3.3" />
<plugin name="cordova-plugin-file-transfer" spec="^1.6.3" />
<plugin name="cordova-plugin-geolocation" spec="^2.4.3">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="This app would like to get your position to calculate distances from POIs around you" />
</plugin>
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^4.0.7">
<variable name="LOCATION_USAGE_DESCRIPTION" value="This app requires access to your location for navigation purposes" />
</plugin>
<plugin name="cordova-plugin-buildinfo" spec="^1.1.0" />
<plugin name="cordova-universal-links-plugin" spec="^1.2.1" />
<plugin name="cordova-plugin-browsertab" spec="^0.2.0" />
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
<plugin name="cordova-plugin-customurlscheme" spec="^4.3.0">
<variable name="URL_SCHEME" value="YOUR_URL_SCHEME" />
<variable name="ANDROID_SCHEME" value="" />
<variable name="ANDROID_HOST" value=" " />
<variable name="ANDROID_PATHPREFIX" value="/" />
</plugin>
<plugin name="cordova-plugin-calendar" spec="^4.6.0">
<variable name="CALENDAR_USAGE_DESCRIPTION" value="This app uses your calendar" />
</plugin>
<plugin name="cordova-plugin-fcm" spec="^2.1.2" />
<plugin name="mx.ferreyra.callnumber" spec="~0.0.2" />
<plugin name="cordova-plugin-googlemaps" spec="^2.0.0">
<variable name="API_KEY_FOR_ANDROID" value="YOUR_API_KEY" />
<variable name="API_KEY_FOR_IOS" value="YOUR_API_KEY" />
<variable name="LOCATION_WHEN_IN_USE_DESCRIPTION" value="Show your location on the map" />
<variable name="LOCATION_ALWAYS_USAGE_DESCRIPTION" value="Trace your location on the map" />
</plugin>
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
<plugin name="cordova-open-native-settings" spec="^1.4.1" />
<plugin name="cordova-plugin-network-information" spec="^1.3.3" />
BUILD.GRADLE :
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.1.1' // google-services plugin
}
}
// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
...
...
...
...
...
apply plugin: 'com.google.gms.google-services'
Gradle version : 3.3
com.google.android.gms:play-services:11.4.2
Some times node module and cordova plugin gets himself wrong, so you do delete manually in the folder.
Don’t forget to remove and add cordova plugin when you update it.
Try to go in android studio => files => project structure => project =>ok
Normally android studio should synchonize your gradle
I spent my whole day yesterday before succeeding to rebuilder my application.
I hope I can help you. Keep going !