I do not think this issue should be seen as a blocker right now.

The error message you provided is something I've only seen when using Gradle
9.x, which is not a supported version.

Older versions of Android Studio, for example Meerkat, can work without
running
`cordova build` since Android Studio will install a Gradle wrapper when it's
missing, but it picks its own version. Meerkat uses 8.12, while this
release's
default version is 8.14.2.

As far as I've been working on Cordova, I have always run `cordova build`
before opening Android Studio. I've always seen some sort of issue if the
project was never pre-built at least once before opening Android Studio.
I've
always believed the pre-build step was a requirement and recommended to
ensure that the project used a supported Gradle version.

Android Studio Otter 3, the previous version, also seems to work, but it
installs Gradle 9.0-milestone-1. This milestone still appears to come with
Groovy 3.0.24, which works. The official Gradle 9 release will come with
Groovy 4.0.27, where I believe these issues start appearing.

I haven't used the official Android Studio Panda 1 since its release earlier
this month, but I tested it this morning and can see that the normal Gradle
wrapper installation step is not running like in previous versions of
Android
Studio. This might hint that there are other major changes, but it would
require more investigation.

As Norman pointed out:

> we should maybe look into this and see if we can get the Gradle wrapper
set
> up earlier, either during prepare or after the platform is created.
> ...
> This can probably be done as a minor or patch release, though.

I also agree that this can potentially be resolved by setting up the Gradle
wrapper after the platform is installed. In the meantime, I believe users
should run `cordova build` before opening the project in Android Studio to
ensure that the correct and supported Gradle version is used.

> So this have to be noted in the release article?

We probably should leave a note. The documentation and release blog
should clearly state that Gradle 9.0 is not supported. As for Android Studio
Panda 1, it is not supported (out-of-box) since it appears to
use unsupported
Gradle/Groovy versions but it can work as long as the user runs "cordova
build"
to ensure the correct Gradle version is prepared.



On Thu, Feb 26, 2026 at 4:56 AM Manuel Beck <[email protected]>
wrote:

> This would be an exception to other releases, or? It’s not enough to
> remove the platform and add it again, you also have to execute `cordova
> build` if you want open it in Android Stuido. I tried if `cordova prepare`
> will fix this, but it don’t. So this have to be noted in the release
> article?
>
> > Am 25.02.2026 um 20:19 schrieb Norman Breau via dev <
> [email protected]>:
> >
> > I can reproduce this error on a fresh android project when using
> > Android Studio, however the error goes away once `cordova build
> > android` is issued.
> >
> > The Cordova CLI builds does work as expected and once it's built once
> > from the Cordova CLI, Android Studio can sync with Gradle and build
> > properly.
> >
> > I believe this issue was introduced when the dummy gradle project was
> > introduced, which is used to setup the gradle wrapper without having
> > AGP interfere with version constraints. I also tested current stable
> > and this issue also produces there, so this isn't a regression.
> > Therefore I don't think the issue should block this release.
> >
> > But we should maybe look into and see if we can get the gradle wrapper
> > setup earlier, either during prepare or after the platform is created.
> > That should fix the issues with Android Studio. This can probably be
> > done as a minor or patch release though.
> >
> > On Wed, 2026-02-25 at 17:28 +0100, Manuel Beck wrote:
> >> When I create a new Cordova Project and add the cordova-android
> >> master by https://github.com/apache/cordova-android, I get the
> >> following error in Android Studio Panda 1 | 2025.3.1:
> >>
> >> Script '/Users/manuelbeck/Projekte/Cordova/test/android-
> >> test/platforms/android/CordovaLib/cordova.gradle' line: 135
> >>
> >> Could not compile script
> >> '/Users/manuelbeck/Projekte/Cordova/test/android-
> >> test/platforms/android/CordovaLib/cordova.gradle'.
> >>> startup failed:
> >>   script '/Users/manuelbeck/Projekte/Cordova/test/android-
> >> test/platforms/android/CordovaLib/cordova.gradle': 135: unable to
> >> resolve class XmlParser
> >>    @ line 135, column 12.
> >>          return new XmlParser(false, false).parseText(xml)
> >>                 ^
> >>
> >>   1 error
> >>
> >>> Am 25.02.2026 um 05:03 schrieb [email protected]:
> >>>
> >>> +1 (binding) (erisu) Bryan Ellis
> >>>
> >>> * Verified "Release Auditing" workflow was passing (License Header
> >>> & Dependency License)
> >>> * Verified "Node CI" testing workflow was passing after tagging
> >>> * Verified 'npm audit' was in acceptable range
> >>> * Verified locally 'npm test' passes
> >>> * Verified reproducible builds by re-generating tarballs and SHA-
> >>> 512 checksums locally. (Note: ZIP must have TZ=UTC set)
> >>> * Verified `cordova platform add`
> >>> * Verified `cordova build`
> >>> * Verified running app on simulator via Android Studio
> >>>
> >>> --
> >>> Bryan Ellis (erisu)
> >>>
> >>> -------------------------------------------------------------------
> >>> --
> >>> To unsubscribe, e-mail: [email protected]
> >>> For additional commands, e-mail: [email protected]
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to