fix(gradle-9): unable to resolve class XmlParser for Groovy 4.x#1896
fix(gradle-9): unable to resolve class XmlParser for Groovy 4.x#1896
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1896 +/- ##
=======================================
Coverage 61.43% 61.43%
=======================================
Files 24 24
Lines 4922 4922
=======================================
Hits 3024 3024
Misses 1898 1898 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
It works now everything, when the platform is added and cordova prepare is called after. When I just add the platform by cordova platform add and open it in Android Studio Panda 1, I get the error: Invalid Gradle JDK configuration found.:
When I do cordova prepare before opening the project, this error is only showed sometimes, but I always get the warning:
When I do cordova build before opening the project in Android Studio Panda 1, I get no warnings and errors.
|
Would it make sense to automatically call |
Platforms affected
n/a
Motivation and Context
Fix
unable to resolve class XmlParser:Description
Added following import to
cordova.gradleWhile this is unconfirmed, I beleive the XmlParser was originally was located in
groovy.util.XmlParserand was deprecated and removed in 4.0.0. The new location for the XmlParser parser isgroovy.xml.XmlParserwhich also existed in version 3.0.0.I believe its safe to add this import to resolve the issue for Gradle 9.0 (Groovy 4) and continue to support Gradle 8.0 (Groovy 3).
Testing
npm tplatform addbuild androidChecklist
(platform)if this change only applies to one platform (e.g.(android))