Flutter deploying to Android studio creating prolog error

19 hours ago 2
ARTICLE AD BOX

I am trying to deploy my first flutter app to an android emulator in vscode/intelij/android studio. All give me the same error. I have been searching and can't find a solution. Deploying to a medium size android emulation. My app works fine in web version. The first time I tried this, my computer crashed. Since then I get this error even after flutter clean. I have done flutter doctor and it says everything is ok except for visual studio not installed. I have tried recreating the andriod folder and no luck.

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...

Running Gradle task 'assembleDebug'...

[Fatal Error] gradle-settings-api-8.13.1.pom:2:1: Content is not allowed in prolog.

[Fatal Error] android-test-plugin-host-logcat-proto-31.13.1.pom:2:1: Content is not allowed in prolog.

[Fatal Error] baseLibrary-8.13.1.pom:2:1: Content is not allowed in prolog.

[Fatal Error] builder-test-api-8.13.1.pom:2:1: Content is not allowed in prolog.

[Fatal Error] sdk-common-31.13.1.pom:2:1: Content is not allowed in prolog.

<many more of these above followed by>

* What went wrong: A problem occurred configuring project ':shared_preferences_android'. > Could not resolve all artifacts for configuration 'classpath'. > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.0. Required by: project :shared_preferences_android > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.0. > Could not parse POM https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/2.3.0/kotlin-gradle-plugin-2.3.0.pom > Resetting to invalid mark > Could not resolve com.android.tools.build:gradle-settings-api:8.13.1. Required by: project :shared_preferences_android > com.android.tools.build:gradle:8.13.1 > Could not resolve com.android.tools.build:gradle-settings-api:8.13.1. > Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-settings-api/8.13.1/gradle-settings-api-8.13.1.pom > Content is not allowed in prolog. > Could not resolve com.android.tools:sdk-common:31.13.1. Required by: project :shared_preferences_android > com.android.tools.build:gradle:8.13.1 > Could not resolve com.android.tools:sdk-common:31.13.1. > Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/31.13.1/sdk-common-31.13.1.pom > Content is not allowed in prolog. Many more lines like the prolog line above. Here is my pubspec.yaml description: "A new Flutter project." publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: sdk: ^3.9.2 dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.8 http: ^1.5.0 flutter_stripe: ^12.4.0 flutter_stripe_web: ^7.4.0 shared_preferences: ^2.5.4 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^6.0.0 flutter: uses-material-design: true assets: - assets/images/ And my build.gradle.kts allprojects { repositories { google() mavenCentral() } } val newBuildDir: Directory = rootProject.layout.buildDirectory .dir("../../build") .get() rootProject.layout.buildDirectory.value(newBuildDir) subprojects { val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) project.layout.buildDirectory.value(newSubprojectBuildDir) } subprojects { project.evaluationDependsOn(":app") } tasks.register<Delete>("clean") { delete(rootProject.layout.buildDirectory) }
Read Entire Article