Flutter build error: Error connecting to the service protocol: failed to connect to http://127.0.0.1:51234/v9-zOlh23aE=/ - flutter

My app build failed with the following build error:
√ Built build\app\outputs\flutter-apk\app-debug.apk.
D/FlutterLocationService(29765): Creating service.
D/FlutterLocationService(29765): Binding to location service.
Error connecting to the service protocol: failed to connect to http://127.0.0.1:51234/v9-zOlh23aE=/
Exited (sigterm)
this happened after pub upgrade.

Though this issue seems to be common and can be caused by various situations, maybe you should check whether the SDK is selected.
In Android Studio, you can set the SDK in File -> Project Structure -> Project SDK, which works in my case.
Or else you can also try flutter clean && flutter upgrade.

Related

Flutter gives "FlutterFirebaseAnalyticsPlugin.java uses unchecked or unsafe operations" error when I try to run without debugging

When I try running my app without debugging. The app gives me the following error and proceeds with the installation(I'm using my phone via USB Debugging to test my app).
Launching lib\main.dart on vivo 1901 in debug mode...
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_analytics-9.1.10\android\src\main\java\io\flutter\plugins\firebase\analytics\FlutterFirebaseAnalyticsPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
√ Built build\app\outputs\flutter-apk\app-debug.apk.
And when I enter my registered details(I have already created an account on my app) on the login page and click login , it gives me an authentication error.
The error is caused due to outdated packages in your flutter project.
To solve the errors, do the following :
Step 1: Run the command flutter pub outdated in the terminal of your development environment. This command will find and display the list of packages that can be updated.
Step 2: Run the command flutter pub upgrade in the terminal of your development environment. This command will update the outdated packages.

Execution failed for task ':video_player:compileDebugJavaWithJavac'

I am trying to run my flutter project but I can't. I receiving the following error from the console:
Execution failed for task ':video_player:compileDebugJavaWithJavac'. > Compilation failed;
I have tried different versions of the video_player package but it doesn't work.
Please update your android studio.
make sure that you have updated everything in android studio.

Errors while deploying chaincode using IBM blockchain platform extension in VSCode

I tried using the sample chaincode of the go version, but failed many times.
The error information of VsCode is as followed
Failed to install on peer Org1 Peer with reason: Could not install smart contact received error: failed with status:500 ::failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: external builder failed: external builder failed to build: external builder 'golang' failed: exit status 1
But it works normally when using the javascript version.
I hope to use the golang to develop my project, what should I do?
Take a look at https://github.com/IBM-Blockchain/blockchain-vscode-extension/wiki/Errors-&-Fixes and follow the steps related to your setup/versions.

Facing issue in a specfic flutter project while running over my ios device in flutter

Failed to establish a debug connection with 661e647d32d2bf1e57a60abeedda37a0af480e22 using mdns: Invalid argument(s): Cannot find executable for /Users/khattab/Desktop/flutter/bin/cache/artifacts/usbmuxd/iproxy.
There is no artifact, so probably build failed. You should check your debug console to see what is the exact problem.

Flutter build error. Issue with flutter webview plugin

I have added the flutter webview plugin but its causing problems. Its giving some error when building the project. I tried to delete the cache and rebuild the project but it didn't work.
I just started learning flutter and can't find a solution to this problem.
Below is the error I am getting.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':flutter_webview_plugin:compileDebugJavaWithJavac'.
Unable to find source java class: 'C:\Users\personal\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.0.9+1\android\src\main\java\com\flutter_webview_plugin\WebviewActivity.java' because it does not belong to any of the source dirs: '[C:\Users\personal\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.1.5\android\src\main\java, C:\Users\personal\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.1.5\android\src\debug\java, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\r\debug, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\buildConfig\debug, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\aidl\debug, C:\Users\personal\Documents\AndroidStudioProjects\flutter_newz\build\flutter_webview_plugin\generated\source\rs\debug]'
BUILD FAILED in 54s
Finished with error: Gradle build failed: 1
I was using other plugins for firebase auth, firebase analytics, google sign in , webview, ect. Updating all the plugins to the latest version solved the problem.