Android builds for a Cordova app I work on began spontaneously failing within the last few days. It appears to be due to trying to reference a value for API 28, which isn't currently available -
Total time: 2.091 secs
(node:19291) UnhandledPromiseRejectionWarning: Unhandled promise rejection
(rejection id: 1): Error: /Users/emmer/dash/platforms/android/gradlew:
Command failed with exit code 1 Error output:
/Users/emmer/dash/platforms/android/build/intermediates/res/merged/armv7/debu
g/values-v28/values-v28.xml:7:41-73: AAPT: No resource found that matches
the given name (at 'dialogCornerRadius' with value '?
android:attr/dialogCornerRadius').
There was a related thread posted a couple days ago where a similar build was failing with the same error. The solution in that case was to update a dependency line in build.gradle -
from:
dependencies {
implementation 'com.android.support:design:+'
}
to:
dependencies {
implementation 'com.android.support:design:'
}
This solution isn't working for me because when I build the Android project in Cordova, the build.gradle file is regenerated and my change is undone at compile time.
I've tried downgrading my Android SDK Platform on my build machine to both include and exclude the new Android P Preview Platform. I've also tried reverting Android SDK Build-Tools from the current 28-rc1 to older versions such as 27 and 26. I've checked my Config.xml to make sure my targeted SDK's are not pointing at API 28 and they aren't -
<preference name="android-minSdkVersion" value="23" />
<preference name="android-targetSdkVersion" value="25" />
Has anyone found a resolution to this issue, aside from manually editing the build.gradle file?