Can't run cordova run android in Ionic project

I’m having an issue running cordova run android in my Ionic project. I’ve uninstalled and reinstalled Cordova, Ionic, Gradle, and Android Studio, yet I still get this following error.

FAILURE: Build failed with an exception.

Where:

Script ‘path/platforms/android/cordova-android-play-services-gradle-release/app-cordova-android-play-services-gradle-release.gradle’ line: 11

What went wrong: A problem occurred evaluating script.

Could not read script ‘path/platforms/android/app/cordova-android-play-services-gradle-release/properties.gradle’ as it does not exist.

Question: How can I get this error to go away and my project to run successfully?

Post your ionic info.

cli packages: (path/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.7
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2
Node       : v8.9.1
npm        : 5.5.1
OS         : macOS Sierra
Xcode      : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

That looks ok. You get that error when you type ionic cordova run android in your project command line?

Yep, still getting the same error :confused:

I don’t know. There was a recent structure change though. Check here, might help. Good luck!

1 Like

What plugins are you using?
You might try to replace cordova-android 7.0.0 with 6.4.0 and try if it works.

Fixed it, I deleted the cordova-android-play-services-gradle…etc plugin and it works now.