# Error building with ionic cordova

**URL:** <https://discuss.gradle.org/t/error-building-with-ionic-cordova/34369>\
**Category:** Help/Discuss\
**Created:** [December 30, 2019, 6:30pm UTC](https://discuss.gradle.org/t/error-building-with-ionic-cordova/34369 "2019-12-30T18:30:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DomsRoberts](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@DomsRoberts](https://discuss.gradle.org/u/DomsRoberts)\
**Post date:** [December 30, 2019, 6:30pm UTC](https://discuss.gradle.org/t/error-building-with-ionic-cordova/34369/1 "2019-12-30T18:30:13Z")

</div>

I am having problems build an ionic project as it fails with a gradle error each time I try to build the project for Android. I couldnt get it to work on my main project, so I created a new one from blank and still get the same error.  
I have tried running it with --verbose and this is the output.

- Where:  
Build file ‘D:\Source\ClubApp\ClubApp\platforms\android\app\build.gradle’ line: 20

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

> Failed to apply plugin [id ‘com.android.application’]  
> Could not create plugin of type ‘AppPlugin’.  
> Could not initialize class com.android.build.gradle.AppPlugin

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

The build.gradle contents is

buildscript {  
repositories {  
google()  
jcenter()  
}

```
dependencies {
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files

    classpath 'com.android.tools.build:gradle:3.3.0'
}

```

}

allprojects {  
repositories {  
google()  
jcenter()  
}

```
//This replaces project.properties w.r.t. build settings
project.ext {
  defaultBuildToolsVersion="28.0.3" //String
  defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
  defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
  defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
}

```

}

task clean(type: Delete) {  
delete rootProject.buildDir  
}
