Building problem

After some time i cant build any more without any logic reason, so if anyone had same problem pls help:

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Users\MyName\Desktop\AppGen\platforms\android\app\build.gradle’ line: 101

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

in ‘build.gradle’ line 101 is :
apply from: “…/cordova-support-google-services/regulator-build.gradle”

package.json:
{
“name”: “AppGen”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “https://ionicframework.com/”,
“scripts”: {
“ng”: “ng”,
“start”: “ng serve”,
“build”: “ng build”,
“test”: “ng test”,
“lint”: “ng lint”,
“e2e”: “ng e2e”
},
“private”: true,
“dependencies”: {
@angular/common”: “~8.1.2”,
@angular/compiler”: “~8.1.2”,
@angular/core”: “~8.1.2”,
@angular/forms”: “~8.1.2”,
@angular/http”: “^7.2.15”,
@angular/platform-browser”: “~8.1.2”,
@angular/platform-browser-dynamic”: “~8.1.2”,
@angular/router”: “~8.1.2”,
@ionic-native/app-version”: “^5.15.0”,
@ionic-native/base64-to-gallery”: “^5.15.1”,
@ionic-native/camera”: “^5.15.1”,
@ionic-native/core”: “^5.0.0”,
@ionic-native/device”: “^5.15.0”,
@ionic-native/file”: “^5.15.1”,
@ionic-native/file-transfer”: “^5.15.1”,
@ionic-native/firebase”: “^5.15.0”,
@ionic-native/http”: “^5.15.0”,
@ionic-native/network”: “^5.15.0”,
@ionic-native/push”: “^5.15.0”,
@ionic-native/splash-screen”: “^5.0.0”,
@ionic-native/sqlite”: “^5.15.0”,
@ionic-native/status-bar”: “^5.0.0”,
@ionic/angular”: “^4.7.1”,
“cordova-android”: “8.1.0”,
“cordova-base64-to-gallery”: “4.1.3”,
“cordova-plugin-advanced-http”: “2.2.0”,
“cordova-plugin-app-version”: “0.1.9”,
“cordova-plugin-camera”: “4.1.0”,
“cordova-plugin-file”: “6.0.2”,
“cordova-plugin-file-transfer”: “1.7.1”,
“cordova-plugin-network-information”: “2.0.2”,
“cordova-sqlite-storage”: “3.4.0”,
“cordova-support-google-services”: “1.3.1”,
“core-js”: “^2.5.4”,
“ionic4-auto-complete”: “^2.1.4”,
“moment”: “^2.24.0”,
“ng2-completer”: “^3.0.2”,
“phonegap-plugin-multidex”: “1.0.0”,
“phonegap-plugin-push”: “2.3.0”,
“rxjs”: “~6.5.1”,
“tslib”: “^1.9.0”,
“zone.js”: “~0.9.1”
},
“devDependencies”: {
@angular-devkit/architect”: “~0.801.2”,
@angular-devkit/build-angular”: “~0.801.2”,
@angular-devkit/core”: “~8.1.2”,
@angular-devkit/schematics”: “~8.1.2”,
@angular/cli”: “~8.1.2”,
@angular/compiler”: “~8.1.2”,
@angular/compiler-cli”: “~8.1.2”,
@angular/language-service”: “~8.1.2”,
@ionic/angular-toolkit”: “~2.0.0”,
@types/jasmine”: “~3.3.8”,
@types/jasminewd2”: “~2.0.3”,
@types/node”: “~8.9.4”,
“codelyzer”: “^5.0.0”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-ionic-keyboard”: “^2.2.0”,
“cordova-plugin-ionic-webview”: “^4.1.2”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “^2.4.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“jasmine-core”: “~3.4.0”,
“jasmine-spec-reporter”: “~4.2.1”,
“karma”: “~4.1.0”,
“karma-chrome-launcher”: “~2.2.0”,
“karma-coverage-istanbul-reporter”: “~2.0.1”,
“karma-jasmine”: “~2.0.1”,
“karma-jasmine-html-reporter”: “^1.4.0”,
“protractor”: “~5.4.0”,
“ts-node”: “~7.0.0”,
“tslint”: “~5.15.0”,
“typescript”: “~3.4.3”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-sqlite-storage”: {},
“cordova-plugin-whitelist”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {
“ANDROID_SUPPORT_ANNOTATIONS_VERSION”: “27.+”
},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-network-information”: {},
“cordova-plugin-advanced-http”: {
“OKHTTP_VERSION”: “3.10.0”
},
“cordova-plugin-app-version”: {},
“phonegap-plugin-push”: {
“ANDROID_SUPPORT_V13_VERSION”: “27.+”,
“FCM_VERSION”: “17.0.+”
},
“cordova-plugin-camera”: {
“ANDROID_SUPPORT_V4_VERSION”: “27.+”
},
“cordova-base64-to-gallery”: {},
“cordova-plugin-file-transfer”: {},
“cordova-plugin-file”: {}
},
“platforms”: [
“android”
]
}
}

I had the same problem some time ago, as least was linked to gradle too. I don’t remember exactly what I did, but I can suggest some things:

  1. Remove and re-add the android platform
  2. Reinstall Android Studio and wait for Gradle install again
  3. Install Gradle separatelly (https://www.javacodegeeks.com/2013/04/how-to-install-gradle-2.html)