I have an Ionic 3 app that has built fine on dev machines for quite a while. Today we tried a new machine and it doesn\'t build there. It is using an older cordova-android
I'm sure I could adjust the build.gradle file that Cordova generates to fix this. However, that would get stepped on by Cordova on every Dev machine. I found a different work-around.
I previously had to mess with the com.android.support
library because different plugins required different versions, and they didn't play well with each other. My approach was to add a build-extras.gradle file (via a hook, see here (option 2) which eventually leads to here) with the contents below. That worked (until fairly recently).
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:26+'
}
}
From what I can tell, something is different about the 26.1.0 version of this library. It seems like it's not available in the same repository or something? Regardless, swapping to an earlier version (below) works. Notice the real change is from 26+
to 26.0+
(which should pull in 26.0.2). This builds fine again.
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:26.0+'
}
}