What went wrong:
Could not resolve all files for configuration ‘:app:debugCompileClasspath’.
Could not find any version that matches com.google.android.gms:strict-version-matcher-plugin:[15.0.0, 16.0.0).
Versions that do not match:
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
Required by:
project :app > com.google.gms:google-services:4.2.0
I have been facing the same error. It started two days ago abruptly. I have done all I can even reinstalled android studio and gradle but noting works.
Which plugins are you using (the output of ionic cordova plugins)? This error is caused by a version conflict which can sometimes happen if different plugins rely on different versions of library.
You can also try running cordova clean to remove previous android build artifacts.
If all else fails try removing the android project and adding it again: ionic cordova platform remove android
Android SDK Tools : 26.1.1 (C:\Users\Paul\AppData\Local\Android\Sdk)
NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10
@webprofusion I have tried removing the platform and adding it again about a thousand times but nothing. I have also tried cordova clean but it has not worked.
And if I try to remove some plugin like the Firebase one, it crashes too with this weird message:
Uninstalling cordova-plugin-firebase from android
Android Studio project detected
missing file :: app/src/main
Error during processing of action! Attempting to revert...
(node:1121) UnhandledPromiseRejectionWarning: Error: Uh oh!
ENOENT: no such file or directory, open '/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/lib/AndroidProject.js:99:12)
at AndroidProject.getCustomSubprojectRelativeDir (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/lib/AndroidProject.js:105:28)
at uninstall (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/lib/pluginHandlers.js:131:46)
at ActionStack.process (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
at PluginManager.doOperation (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
at PluginManager.removePlugin (/Users/smartlogin/Desktop/SmartLogin-android2copia/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:148:17)
(node:1121) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1121) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Is onesignal required? The firebase plugin also looks pretty old and you could try updating it.
Note that for all Android apps you now need to target the SDK level 26 in order to submit app updates via Google Play, which can also result in some things needing updated as well, so it’s generally worth keeping your plugins up to date.
Thank you for your help and suggestions. Turns out the firebase plugin was the culprit. I verified this by uninstalling it and then building my app with success. I resolved this error with the following steps:
delete /platforms/android folder (take backup first for safety)