Issue
My newly created virtual devices in Android Studio are being identified as AOSP on IA Emulator.
This doesn't create any problem running the app in debug mode, but when I want to add --profile
argument in order to check the performance tab from Dev Tools it doesn't run and I get this error message:
[ +31 ms] executing: /usr/bin/xcodebuild -version
[ +6 ms] Exit code 1 from: /usr/bin/xcodebuild -version
[ ] xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
[ +5 ms] ro.hardware = ranchu
[{"event":"daemon.connected","params":{"version":"0.6.0","pid":27682}}]
[ +57 ms] "flutter run" took 858ms.
[ +2 ms] ensureAnalyticsSent: 0ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
[ +6 ms] Exception: Profile mode is not supported for AOSP on IA Emulator.
[ +3 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:469:9)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:836:33)
<asynchronous suspension>
#4 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
#5 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#6 _rootRun (dart:async/zone.dart:1190:13)
#7 _CustomZone.run (dart:async/zone.dart:1093:19)
#8 _runZoned (dart:async/zone.dart:1630:10)
#9 runZoned (dart:async/zone.dart:1550:10)
#10 AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#11 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:825:20)
#12 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#13 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:335:21)
#14 _rootRunUnary (dart:async/zone.dart:1198:47)
#15 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#16 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#17 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#18 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#19 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#20 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#21 _rootRun (dart:async/zone.dart:1190:13)
#22 _CustomZone.run (dart:async/zone.dart:1093:19)
#23 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#24 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#25 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#26 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#27 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#28 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
Does anybody else encounter this issue before?
Solution
You can not run flutter application on emulator or simulator in profile mode. You can only do it on real devices.
From Flutter docs:
Profile mode is disabled on the emulator and simulator, because their behavior is not representative of real performance.
Answered By - Mol0ko
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.