Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler


With some automatic updates my app will no longer compile for android, always erroring out with the error:

* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
 option to get more log output.


I’ve tried upgrading/downgrading cordova and plugins and cordova-android, and adding the cordova-android-support-gradle-release plugin with the variable specified based on various google searches all to no avail. Anyone have any idea what’s going on and how to make it work?

Ionic Info:

cli packages: (/Users/mbeckett/.nvm/versions/node/v6.9.1/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.3.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2


    Android SDK Tools : 26.0.2
    ios-deploy        : 1.9.2
    Node              : v6.9.1
    npm               : 3.10.8
    OS                : macOS High Sierra
    Xcode             : Xcode 9.4 Build version 9F1027a

Environment Variables:

    ANDROID_HOME : /Users/mbeckett/Library/Android/sdk


    backend : legacy


I’m still not able to get past this, any insights from anyone?

// upgrade cordova itself
$> npm -g install cordova

// Reinstall the maps plugin
$> cordova plugin rm cordova-plugin-googlemaps

$> cordova plugin add cordova-plugin-googlemaps --variable ...


As I said in the other thread - cordova is up to date (and I have tried various versions), and I’m NOT using the google maps plugin

ionic cordova plugin list
> cordova plugin ls
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-http 1.2.0 "SSL Pinning"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-speechrecognition 1.1.2 "Speech Recognition"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-tts 0.2.3 "TTS"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.3.2 "Cordova sqlite storage plugin"
cordova_app_version_plugin 0.2.6 "getAppVersion"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 6.0.8 "BarcodeScanner"


I believe there is no plugin that use variable ANDROID_SUPPORT_V4_VERSION than cordova-plugin-googlemaps.

Anyway, you need to modify platform/platforms/build.gradle file by yourself.


I have same problem. did you get any solution?


In my case it was the barcode scanner plugin that needed to be upgraded. A whole bunch of dependencies got upgraded at the time so I don’t remember all the specifics


Could not get unknown property ‘ANDROID_SUPPORT_ANNOTATIONS_VERSION’ for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

That’s happen to me after I am installed google maps geolocation, but before it, I dowgrade the version of cordova because cordova pluging add cordova-plugin-geolocation was not working. After that I installed again the las version of cordova and I tried to do ionic cordova run android and got this error…

What do you mean here, what I need to modify in my build.gradle? I already added again android platform with the last version of cordova.

it’s my package.json
"cordova-plugin-ionic-webview": { "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" },


This can be fix by open plaforms/android/, then change line
Hope it helps
Best Regards