Description: I recently purchased a Moto e22 device running Android 12 and encountered several issues while trying to build my Flutter project using Android Studio.
First Problem: After creating a new Flutter project with no modifications, when I attempted to run the project from Android Studio using the play button, the build succeeded, but I encountered a white screen with no logs in the run tab. However, if I manually kill the app and relaunch it on the Android device without any further build from Android Studio, it runs without any issues.
Second Problem: When I tried running the project using flutter run --verbose or flutter run --debug, the app installed successfully on my Android device, but I got stuck with the message "Waiting for VM Service port to be available" or "Built build/app/outputs/flutter-apk/app-debug.apk" without any further actions such as hot reload or hot restart.
Here's a summary of my Flutter doctor output:
this is my flutter doctor summary
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel main, 3.21.0-17.0.pre.19, on macOS 12.6.8 21G725 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
! CocoaPods 1.12.1 out of date (1.13.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 1 category.
I've attempted various solutions found in threads, including changing the Flutter channel, but the issues persist.
Here's the output of my logcat:
2024-03-29 06:58:54.905 669-830 UxUtility [email protected] E notifyAppState error = NULL
2024-03-29 06:58:54.926 2937-2937 PhoneInterfaceManager com.android.phone E [PhoneIntfMgr] getCarrierPackageNamesForIntentAndPhone: No UICC
2024-03-29 06:58:54.943 3886-3886 AidRoutingManager com.android.nfc E Size of routing table804
2024-03-29 06:58:54.958 681-681 BpTransact...edListener surfaceflinger E Failed to transact (-32)
2024-03-29 06:58:54.958 681-681 BpTransact...edListener surfaceflinger E Failed to transact (-32)
2024-03-29 06:58:54.986 681-834 BufferQueueDebug surfaceflinger E [com.android.settings/com.android.settings.SubSettings#0](this:0xb400007a470532e8,id:-1,api:0,p:-1,c:-1) id info cannot be read from 'com.android.settings/com.android.settings.SubSettings#0'
2024-03-29 06:58:55.381 681-834 BufferQueueDebug surfaceflinger E [Splash Screen com.whimstech.driverapp.new_flutter_project#0](this:0xb400007a47069f68,id:-1,api:0,p:-1,c:-1) id info cannot be read from 'Splash Screen com.whimstech.driverapp.new_flutter_project#0'
2024-03-29 06:58:55.494 669-830 UxUtility [email protected] E notifyAppState error = NULL
2024-03-29 06:58:55.633 6026-6043 OpenGLRenderer com.android.settings E EglManager::makeCurrent mED = 0x1, surface = 0x0, mEC = 0xb4000078bd6be650, error = EGL_SUCCESS
2024-03-29 06:58:55.741 6249-6271 QT pid-6249 E [QT]file does not exist
2024-03-29 06:58:56.370 681-835 BufferQueueDebug surfaceflinger E [com.whimstech.driverapp.new_flutter_project/com.whimstech.driverapp.new_flutter_project.MainActivity#0](this:0xb400007a47042188,id:-1,api:0,p:-1,c:-1) id info cannot be read from 'com.whimstech.driverapp.new_flutter_project/com.whimstech.driverapp.new_flutter_project.MainActivity#0'
2024-03-29 06:58:56.400 6249-6269 OpenGLRenderer com...driverapp.new_flutter_project E EglManager::makeCurrent mED = 0x1, surface = 0x0, mEC = 0xb4000078bd6b8110, error = EGL_SUCCESS
2024-03-29 06:58:56.400 681-835 BufferQueueDebug surfaceflinger E [SurfaceView[com.whimstech.driverapp.new_flutter_project/com.whimstech.driverapp.new_flutter_project.MainActivity](BLAST)#0](this:0xb400007a47056078,id:-1,api:0,p:-1,c:-1) id info cannot be read from 'SurfaceView[com.whimstech.driverapp.new_flutter_project/com.whimstech.driverapp.new_flutter_project.MainActivity](BLAST)#0'
2024-03-29 06:58:56.407 681-835 HWComposer surfaceflinger E getSupportedContentTypes: getSupportedContentTypes failed for display 0: Unsupported (8)
2024-03-29 06:58:56.413 6249-6276 ion com...driverapp.new_flutter_project E ioctl c0044901 failed with code -1: Invalid argument
2024-03-29 06:59:00.457 24427-4404 WakeLock com.google.android.gms.persistent E GCM_HB_ALARM release without a matched acquire!
2024-03-29 06:59:00.470 6249-6269 OpenGLRenderer com...driverapp.new_flutter_project E fbcNotifyFrameComplete error: undefined symbol: fbcNotifyFrameComplete
2024-03-29 06:59:00.470 6249-6269 OpenGLRenderer com...driverapp.new_flutter_project E fbcNotifyNoRender error: undefined symbol: fbcNotifyNoRender
Complete Output of flutter run --verbos
[ +13 ms] Stopping app 'app-debug.apk' on moto e22.
[ +1 ms] executing: /Users/ibtihajnaeem/Library/Android/sdk/platform-tools/adb -s ZE2235Q3DM shell am force-stop
com.whimstech.driverapp.new_flutter_project
[ +202 ms] executing: /Users/ibtihajnaeem/Library/Android/sdk/platform-tools/adb -s ZE2235Q3DM shell pm list packages
com.whimstech.driverapp.new_flutter_project
[ +106 ms] package:com.whimstech.driverapp.new_flutter_project
[ +5 ms] executing: /Users/ibtihajnaeem/Library/Android/sdk/platform-tools/adb -s ZE2235Q3DM shell cat
/data/local/tmp/sky.com.whimstech.driverapp.new_flutter_project.sha1
[ +85 ms] d398535fddb940e49abe5dd0a43b3932ccf5e1be
[ +1 ms] Latest build already installed.
[ +2 ms] executing: /Users/ibtihajnaeem/Library/Android/sdk/platform-tools/adb -s ZE2235Q3DM shell -x logcat -v time -t 1
[ +92 ms] --------- beginning of main
03-29 07:25:16.521 E/BpTransactionCompletedListener( 681): Failed to transact (-32)
[ +21 ms] executing: /Users/ibtihajnaeem/Library/Android/sdk/platform-tools/adb -s ZE2235Q3DM shell am start -a android.intent.action.MAIN -c
android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true
com.whimstech.driverapp.new_flutter_project/com.whimstech.driverapp.new_flutter_project.MainActivity
[ +124 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000
cmp=com.whimstech.driverapp.new_flutter_project/.MainActivity (has extras) }
[ +1 ms] Waiting for VM Service port to be available...