0

As of writing this my android studio IDE is updated to the newest version (Android Studio Giraffe | 2022.3.1). I have tried to create new projects and fix the build errors but nothing helped and this is the log I get. BUILD LOG

> Configure project :
[Fatal Error] httpclient-4.5.13.pom:2:1: Content is not allowed in prolog.
[Fatal Error] httpclient-4.5.13.pom:2:1: Content is not allowed in prolog.
[Fatal Error] jna-platform-5.6.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] jna-platform-5.6.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] juniversalchardet-1.0.3.pom:2:1: Content is not allowed in prolog.
[Fatal Error] juniversalchardet-1.0.3.pom:2:1: Content is not allowed in prolog.
[Fatal Error] asm-tree-9.2.pom:2:1: Content is not allowed in prolog.
[Fatal Error] asm-tree-9.2.pom:2:1: Content is not allowed in prolog.
[Fatal Error] istack-commons-runtime-3.0.8.pom:2:1: Content is not allowed in prolog.
[Fatal Error] txw2-2.3.2.pom:2:1: Content is not allowed in prolog.
[Fatal Error] FastInfoset-1.2.16.pom:2:1: Content is not allowed in prolog.
[Fatal Error] istack-commons-runtime-3.0.8.pom:2:1: Content is not allowed in prolog.
[Fatal Error] txw2-2.3.2.pom:2:1: Content is not allowed in prolog.
[Fatal Error] FastInfoset-1.2.16.pom:2:1: Content is not allowed in prolog.
[Fatal Error] jakarta.activation-api-1.2.1.pom:2:1: Content is not allowed in prolog.
[Fatal Error] jakarta.activation-api-1.2.1.pom:2:1: Content is not allowed in prolog.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Meetie'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.apache.httpcomponents:httpcore:4.4.15.
     Required by:
         project : > com.android.application:com.android.application.gradle.plugin:8.1.0 > com.android.tools.build:gradle:8.1.0 > com.android.tools:sdklib:31.1.0
         project : > com.android.application:com.android.application.gradle.plugin:8.1.0 > com.android.tools.build:gradle:8.1.0 > com.android.tools.analytics-library:crash:31.1.0
      > Could not resolve org.apache.httpcomponents:httpcore:4.4.15.
         > Could not parse POM https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15.pom
            > Could not resolve org.apache.httpcomponents:httpcomponents-core:4.4.15.
               > Could not resolve org.apache.httpcomponents:httpcomponents-core:4.4.15.
                  > Could not parse POM https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.15/httpcomponents-core-4.4.15.pom
                     > Could not resolve org.apache.httpcomponents:httpcomponents-parent:11.
                        > Could not resolve org.apache.httpcomponents:httpcomponents-parent:11.
                           > Could not parse POM https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-parent/11/httpcomponents-parent-11.pom
                              > Resetting to invalid mark
                        > Could not resolve org.apache.httpcomponents:httpcomponents-parent:11.
                           > Could not parse POM https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcomponents-parent/11/httpcomponents-parent-11.pom
                              > Resetting to invalid mark
               > Could not resolve org.apache.httpcomponents:httpcomponents-core:4.4.15.
                  > Could not parse POM https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcomponents-core/4.4.15/httpcomponents-core-4.4.15.pom
                     > Could not resolve org.apache.httpcomponents:httpcomponents-parent:11.
                        > Could not resolve org.apache.httpcomponents:httpcomponents-parent:11.
                           > Could not parse POM https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-parent/11/httpcomponents-parent-11.pom
                              > Resetting to invalid mark
                        > Could not resolve org.apache.httpcomponents:httpcomponents-parent:11.
                           > Could not parse POM https://plugins.gradle.org/m2/org/apache/httpcomponents/httpcomponents-parent/11/httpcomponents-parent-11.pom
                              > Resetting to invalid mark

and so on.... Tried changing android gradle plugin version gradle version compilesdk nothing changed.

Duje1
  • 1
  • 1
  • 2
  • [this might help you](https://stackoverflow.com/questions/3030903/content-is-not-allowed-in-prolog-when-parsing-perfectly-valid-xml-on-gae) – JustSightseeing Jul 29 '23 at 19:17

1 Answers1

0

What did it for me was installing manually newest gradle and setting as default in gradle jvm settings and changing jdk in build.gradle not through android studio.

Duje1
  • 1
  • 1
  • 2