How to fix the compilation error in android in ionic3?

When I try to compile and build apk using command

ionic cordova run android

I got error as

Execution failed for task ':preDebugBuild'.

  Android dependency '' has different version for the compile (26.0.0-alpha1) and runtime (27.0.2) classpath. You should manually set the same version via DependencyResolution

Please advise how it fix ?



Please try 
1. rm -rf node_modules 
followed by 
2. npm install

Your solution fix my problem…

but one typo in command : > rm -rf node_modules

thanks alot


1 Like