Reputation: 51
I am new in the flutter and trying to install it with following steps... 1) download and unzipped in drive 2) Set path in environment variables
Now i am trying to run flutter doctor it's showing me below error please check if anyone face same issue...Thanks!
` [√] Flutter (Channel beta, v0.6.0, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
-Unhandled exception:
ProcessException: %1 is not a valid Win32 application.
Command: C:\Users\Rahul Mishra\AppData\Local\Android\Sdk\platform-tools\adb.EXE devices -l
#0 _ProcessImpl._runAndWait (dart:io/runtime/binprocess_patch.dart:488:7)
#1 _runNonInteractiveProcessSync (dart:io/runtime/binprocess_patch.dart:634:18)
#2 Process.runSync (dart:io/runtime/binprocess_patch.dart:66:12)
#3 LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:83:20)
#4 _runWithLoggingSync (package:flutter_tools/src/base/process.dart:322:48)
#5 runSync (package:flutter_tools/src/base/process.dart:296:10)
#6 getAdbDevices (package:flutter_tools/src/android/android_device.dart:563:23)
#7 AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device.dart:55:53)
<asynchronous suspension>
#8 PollingDeviceDiscovery.devices (package:flutter_tools/src/device.dart:163:56)
<asynchronous suspension>
#9 DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:91:46)
<asynchronous suspension>
#10 DeviceValidator.validate (package:flutter_tools/src/doctor.dart:537:54)
<asynchronous suspension>
#11 Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:88:56)
#12 Doctor.diagnose (package:flutter_tools/src/doctor.dart:145:41)
#13 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#14 Doctor.diagnose (package:flutter_tools/src/doctor.dart:135:24)
#15 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:29:39)
#16 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#17 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:28:42)
#18 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:348:18)
#19 _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#20 _rootRunUnary (dart:async/zone.dart:1132:38)
#21 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#22 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#23 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#24 Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#25 Future._complete (dart:async/future_impl.dart:476:7)
#26 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#27 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#28 _rootRun (dart:async/zone.dart:1124:13)
#29 _CustomZone.run (dart:async/zone.dart:1021:19)
#30 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#31 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#32 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#33 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:114:13)
#34 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:170:5)`
Upvotes: 5
Views: 3625
Reputation: 65
Like @cshortridge mentioned its because of the ANDROID_HOME had space but that solution didn't work for me, so I started to search and I discovered you just have to move the Android SDK which is located by default. I found this wonderful tutorial to change the path of the SDK manager:
https://github.com/flutter/flutter/issues/19805#issuecomment-478306166
hope that helps someone :)
Upvotes: 0
Reputation:
It is because of the space in your username. I had the same issue and messed up my whole registry and changed the directory of my user to something without last name. At the end it worked. First change your username and then try to change the directory name
Upvotes: 0
Reputation: 66
When I ran into this it was because the environment variable ANDROID_HOME had a space in it, in your case it would be C:\Users\Rahul Mishra\AppData\Local\Android\Sdk and there is a space between Rahul and Mishra
What I did to resolve it is make a junction to my profile that doesn't contain spaces and redirect ANDROID_HOME to it. To make a junction you would do something like:
mklink /J C:\Users\rmishra "C:\Users\Rahul Mishra"
Then in System Properties -> Environment Variables change ANDROID_HOME to point to C:\Users\rmishra\AppData\Local\Android\Sdk
Hopefully this helps
Upvotes: 5
Reputation: 622
Did you install Android Studio, it is sending and adb error i believe that part of the android sdk installation.
Please do all the steps from the documentation for windows.
Upvotes: 0