Reputation: 69
I'm dealing with a very frustrating problem where I am unable to launch my app with my Android emulator. I am using VS Code and Android Studio for the emulator. It keeps getting hung up.
When I try to launch from VS Code (Run > Start Debugging), it hangs on Flutter: Launching...
When I try to launch from Powershell (flutter run --verbose
), it hangs on Waiting for observatory port to be available...
[ +228 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=com.ceventures.app.locationalerts.cedric.eicher/.MainActivity (has extras) }
[ +4 ms] Waiting for observatory port to be available...
Initially, going down some rabbit holes online led me to think my package/app id might be wrong. Here are what they are in all locations:
android/app/src/main/AndroidManifest.xml:
package="com.ceventures.app.locationalerts.cedric.eicher">
android/app/src/profile/AndroidManifest.xml:
package="com.ceventures.app.locationalerts.cedric.eicher">
android/app/src/debug/AndroidManifest.xml:
package="com.ceventures.app.locationalerts.cedric.eicher">
android/app/build.gradle:
defaultConfig { applicationId "com.ceventures.app.locationalerts.cedric.eicher" minSdkVersion 21 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true }
android/app/google-services.json:
"package_name": "com.ceventures.app.locationalerts.cedric.eicher"
android/app/src/main/kotlin/com/example/locationalertsapp/MainActivity.kt:
package com.ceventures.app.locationalerts.cedric.eicher
Things I have tried:
Any help is appreciated, this is driving me crazy! It just worked a few days ago!
Upvotes: 0
Views: 4595
Reputation: 1
When I had the same problem this worked for me:
Tested with Ubuntu 22.04.
Upvotes: 0
Reputation: 69
SOLVED -- NOTE I AM OP
So after a week of dealing with this, the following led me to getting things to finally work:
Doing a windows update
Switching to the flutter stable branch, and then doing flutter upgrade
Doing a cold boot of my emulator device
Resolving pubspec package issues and the environment:
and sdk:
versions worked for all the packages (if they don't, you'll be alerted)
Updating the following to the original com.example.locationalertsapp
android/app/src/main/AndroidManifest.xml android/app/src/profile/AndroidManifest.xml android/app/src/debug/AndroidManifest.xml
I really don't know why this all worked. I had to step away from this issue for a few days just because I couldn't handle it anymore and I felt like I was down rabbit hole after rabbit hole.
Hopefully this helps someone in the future!
Upvotes: 0