I’m a first-time user of cordova and I have no prior experience with Android Studio, so please be kind.
Background: Following the android dependencies of cordova documented at cordova.apache.org, I installed Gradle 8.7, Kotlin 1.9.22, and java version “1.8.0_101”. While it requires Gradle 8.7, cordova.apache.org also lists the required Gradle Plugin version as 8.3. In Android Studio | Settings… | Plugins I see that a plugin for Gradle has been installed, but I don’t see any way to control the version of the plugin that is installed.
Ok, so when building a new project in cordova I get the following build error, but I don’t see why it is picking up Gradle 8.3:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'MyProject'.
> Could not resolve all artifacts for configuration ':classpath'.
> **Could not resolve com.android.tools.build:gradle:8.3.0**.
Required by:
project :
> No matching variant of com.android.tools.build:**gradle:8.3.0** was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' **with value '8.7'** but:
- **Variant 'apiElements' declares a library**, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, **compatible with Java 11** and the consumer needed a component for use during runtime, **compatible with Java 8**
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.7')