I'm new to Flutter and overall Android development. When I run the virtual device from Android Studio, I don't get any errors. However, when I connect my device running on a custom ROM to a laptop (USB debugging enabled and installed Google USB driver from Android Studio), I get the following errors continuously:
$ flutter run
Launching lib\main.dart on Mi MIX 3 5G in debug mode...
Running Gradle task 'assembleDebug'...
F/GPQeSE-HAL(31453): Error while registering secure_element V1.2 service: -2147483648
Running Gradle task 'assembleDebug'...
F/[email protected](31452): Error while registering eSE power manager service: -2147483648
Running Gradle task 'assembleDebug'...
F/[email protected](31451): Error while registering eSE power manager service: -2147483648
Running Gradle task 'assembleDebug'...
F/[email protected](31489): Error while registering eSE power manager service: -2147483648
Running Gradle task 'assembleDebug'...
F/GPQeSE-HAL(31490): Error while registering secure_element V1.2 service: -2147483648
Running Gradle task 'assembleDebug'...
F/[email protected](31488): Error while registering eSE power manager service: -2147483648
Running Gradle task 'assembleDebug'...
F/GPQeSE-HAL(31518): Error while registering secure_element V1.2 service: -2147483648
Running Gradle task 'assembleDebug'...
F/[email protected](31517): Error while registering eSE power manager service: -2147483648
Running Gradle task 'assembleDebug'...
F/[email protected](31516): Error while registering eSE power manager service: -2147483648
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 15.0s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
F/GPQeSE-HAL(31689): Error while registering secure_element V1.2 service: -2147483648
F/[email protected](31686): Error while registering eSE power manager service: -2147483648
F/[email protected](31687): Error while registering eSE power manager service: -2147483648
Syncing files to device Mi MIX 3 5G... 72ms
Flutter run key commands.
r Hot reload.
R Hot restart.
h Repeat this help message.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
Running with sound null safety
An Observatory debugger and profiler on Mi MIX 3 5G is available at: http://127.0.0.1:54763/6oO2jX9xZzI=/
Activating Dart DevTools...
F/[email protected](31758): Error while registering eSE power manager service: -2147483648
Activating Dart DevTools...
F/GPQeSE-HAL(31759): Error while registering secure_element V1.2 service: -2147483648
Activating Dart DevTools...
F/[email protected](31757): Error while registering eSE power manager service: -2147483648
Activating Dart DevTools... 2,677ms
The Flutter DevTools debugger and profiler on Mi MIX 3 5G is available at: http://127.0.0.1:9101?uri=http%3A%2F%2F127.0.0.1%3A54763%2F6oO2jX9xZzI%3D%2F
F/GPQeSE-HAL(31785): Error while registering secure_element V1.2 service: -2147483648
Although I can run the default Flutter app on my Android device, for now, I'm worried it will give me more headaches in the future and it's annoying.
It depends on the OS you are using for running the app on the mobile device. Normally, if you keep USB Debugging and the developer mode on in the mobile device, you won't get any further issues. Just make sure that all the required developer options are toggled on. Generally, keep a good connection both with the mobile and the internet to avoid errors due to lag in the service. For more info, you can run command for flutter doctor on you command prompt. If it shows a tick in front of mobile connection, you are ready to go.