0

I have installed a complete setup of flutter, flutter doctor does not show any errors. Flutter web is working perfectly fine but when I try to build an apk then it shows this error

Launching lib\main.dart on M2007J20CG in debug mode...
lib\main.dart:1
[Fatal Error] gson-2.8.5.pom:2:1: Content is not allowed in prolog.
[Fatal Error] kotlin-reflect-1.3.72.pom:2:1: Content is not allowed in prolog.
[Fatal Error] kotlin-stdlib-1.3.72.pom:2:1: Content is not allowed in prolog.
[Fatal Error] jsr305-1.3.9.pom:2:1: Content is not allowed in prolog.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.3.72.
     Required by:
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-compiler-runner:1.3.50 > org.jetbrains.kotlin:kotlin-daemon-client:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-common:1.3.50
      > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.3.72.
         > Could not parse POM https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.3.72/kotlin-reflect-1.3.72.pom
            > Content is not allowed in prolog.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.72.
     Required by:
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-native-utils:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-common:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-jvm:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-native-utils:1.3.50 > org.jetbrains.kotlin:kotlin-util-io:1.3.50
      > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.72.
         > Could not parse POM https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.72/kotlin-stdlib-1.3.72.pom
            > Content is not allowed in prolog.
   > Could not resolve com.google.code.gson:gson:2.8.5.
     Required by:
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
         project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0
         project : > com.android.tools.build:gradle:4.1.0 > com.google.protobuf:protobuf-java-util:3.10.0
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdklib:27.1.0
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.build:manifest-merger:27.1.0
project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 > com.android.tools.analytics-library:shared:27.1.0
      > Could not resolve com.google.code.gson:gson:2.8.5.
         > Could not parse POM https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.pom
            > Content is not allowed in prolog.
   > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.3.72.
     Required by:
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.lint:lint-gradle-api:27.1.0
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0
      > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.3.72.
         > Could not parse POM https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.3.72/kotlin-reflect-1.3.72.pom
            > Content is not allowed in prolog.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.72.
     Required by:
         project : > com.android.tools.build:gradle:4.1.0 > org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72
         project : > com.android.tools.build:gradle:4.1.0 > org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72 > org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72
      > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.72.
         > Could not parse POM https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.72/kotlin-stdlib-1.3.72.pom
            > Content is not allowed in prolog.
   > Could not resolve com.google.code.gson:gson:2.8.5.
     Required by:
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09
      > Could not resolve com.google.code.gson:gson:2.8.5.
> Could not parse POM https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.pom
            > Content is not allowed in prolog.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.72.
     Required by:
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09
      > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.72.
         > Could not parse POM https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.72/kotlin-stdlib-1.3.72.pom
            > Content is not allowed in prolog.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Exception: Gradle task assemble Debug failed with exit code 1

Can anyone help me out. I am trying to fix it and its been 3 days. I don't know what am I missing, can you help me or suggest me some fix regarding it. Any help would be appreciated.

0 Answers0