Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter with installation error for %1 is not a valid win32 application

Tags:

flutter

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)`
like image 457
Arnav sharma Avatar asked Sep 04 '18 17:09

Arnav sharma


People also ask

How do you solve %1 is not a valid Win32 application?

Run the Program as Administrator. Some programs may need an administrator privilege for running. Giving the administrator privilege may solve the problem. You just need to right-click the installer file and choose Run as administrator.

What does not a valid Win32 application mean?

The message "winzipxxx.exe is not a valid win32 application" indicates that the EXE file did not download completely. When Windows then tries to run what appears to be an executable file, it finds that it is not a valid Windows 32-bit application file due to the incomplete download.


1 Answers

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

like image 91
cshortridge Avatar answered Oct 11 '22 02:10

cshortridge