Content is not allowed in prolog - Flutter

Viewed 51

Yesterday I move to windows 11 and Installed Flutter. It was working fine I also run the default app successfully. But when I run one of my ongoing project it show error like these.

[Fatal Error] firebase-annotations-16.0.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] firebase-annotations-16.0.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] firebase-annotations-16.0.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] firebase-annotations-16.0.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] firebase-annotations-16.0.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] firebase-annotations-16.0.0.pom:2:1: Content is not allowed in prolog.
[Fatal Error] firebase-annotations-16.0.0.pom:2:1: Content is not allowed in prolog.
 .....

And also some error like =>

Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve androidx.browser:browser:1.4.0.
     Required by:
         project :app > project :firebase_auth > com.google.firebase:firebase-auth:21.0.5
      > Could not resolve androidx.browser:browser:1.4.0.
         > Could not parse module metadata https://dl.google.com/dl/android/maven2/androidx/browser/browser/1.4.0/browser-1.4.0.module
            > Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
      > Could not resolve androidx.browser:browser:1.4.0.
         > Could not parse module metadata 


..............

I try many solutions like

  1. Deleting the build and .idea file.
  2. Invalidate caches.
  3. Moving google() to the top of the repositories.
  4. I also create a new project and transfer all file to that project but it did not work.

And many more but none of them work. Please help me. Starting with these error Then these error flutter doctor

1 Answers

Add these plugins

  cloud_firestore_web: ^2.6.15
  cloud_firestore: ^3.1.15
Related