androidgradlecompiler-errorsxml-parsinggithub-actions

Gradle SAXParseException cvc-complex-type.2.4.a


When i change from jcenter() to mavenCentral(). when excuting ./gradlew assembleDebug --stacktrace --debug on GitHub CI i got hit with this error:

2024-03-30T14:05:43.0666766Z cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{layoutlib}' is expected.:
2024-03-30T14:05:43.0669527Z org.xml.sax.SAXParseException; lineNumber: 141; columnNumber: 252; cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{layoutlib}' is expected.
2024-03-30T14:05:43.0672567Z    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)

it also happen when i edit activity layout xml file and activity java file.

After searching on Stack Overflow and find some similar but not exactly same problems. AFAIK peoples say it's a bug and i should update Gradle and Android Gradle Plugin but due to some deprecation stuff it's inconvenience to update.

I also updated from Java 8 to Java 11 but still error

Do anyone here know why this is happening and how do i fix this? Thanks for reading

That GitHub project actions pages for full logs and context: https://github.com/oong819/video-transcoder/actions


Solution

  • nvm i just discovered that its not the exception that make the build fail, its just one of the package not found Maven Central