What @helpmelearn says is correct. I know it’s a default policy of Google to introduce breaking changes and only support the Android ecosystem, so all plugin maintainers have to keep their plugins up-to-date.
But what is the right course of action here for us developers? Should we follow the releases of say e.g. Firebase and be prepared for breaking changes? This seems like a counter-intuitive way of plugins to depend on --> independent maintainers (you guys are doing god’s work) who depend on --> Google’s breaking changes?
We suddenly have a breaking build in our pipeline and we can’t release our app.
Make sure your gradle.properties has: cdvMinSdkVersion=19
Make sure your build.gradle has: project.ext { defaultBuildToolsVersion="28.0.3" //String defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4 defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default }
Make sure your confix.xml has: <preference name="android-minSdkVersion" value="19" />
This person explains the problem pretty well on his answer, so i encourage you to read it.
UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform “android” does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
@JorgeU i am getting the above error while rrunning the app. do i need to update anyother plugin?
For me the simplest working solution without modifying any plugins or cordova-android was to add the following to the build gradle (or to build-extras.gradle):
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.1'
force 'com.google.android.gms:play-services-tagmanager:16.0.8'
force 'com.google.android.gms:play-services-base:16.1.0'
force 'com.google.android.gms:play-services-tasks:16.0.1'
force 'com.google.android.gms:play-services-basement:16.2.0'
force 'com.google.android.gms:play-services-gcm:16.1.0'
force 'com.google.android.gms:play-services-stats:16.0.1'
force 'com.google.android.gms:play-services-location:16.0.0'
force 'com.google.android.gms:play-services-auth:16.0.1'
force 'com.google.android.gms:play-services-identity:16.0.0'
}
}
it forces your apk to work as it did before the google breaking changes which I think is the safest way not to break other plugins.
Could not find any version that matches androidx.annotation:annotation:28.+.
Versions that do not match:
- 1.1.0
- 1.1.0-rc01
- 1.1.0-beta01
- 1.1.0-alpha02
- 1.1.0-alpha01
- + 8 more
Required by:
project :app
Could not find any version that matches androidx.legacy:legacy-support-v4:28.+.
Versions that do not match:
- 1.0.0
- 1.0.0-rc02
- 1.0.0-rc01
- 1.0.0-beta01
- 1.0.0-alpha3
- + 1 more
Required by:
project :app
Could not find any version that matches androidx.appcompat:appcompat:28.+.
Versions that do not match:
- 1.1.0-beta01
- 1.1.0-alpha05
- 1.1.0-alpha04
- 1.1.0-alpha03
- 1.1.0-alpha02
- + 9 more
Required by:
project :app
Error:(40, 0) Minimum supported Gradle version is 4.10.1. Current version is 4.1.
Please fix the project's Gradle settings.
<a href="fixGradleVersionInWrapper">Fix Gradle wrapper and re-import project</a><br><a href="openGradleSettings">Gradle settings</a>
In /platforms/android/gradle/gradle.wrapper.properties I have: