I am in a powershell window on my PC and I am attempting to run 'dotnet-dsrouter android' in order to set up profiling of my app on my android device.
After hitting enter, I am seeing several errors as shown below. I do have the tool dotnet-dsrouter installed.
PS C:\Users\gmceaser> dotnet-dsrouter android
WARNING: dotnet-dsrouter is a development tool not intended for production environments.
How to connect current dotnet-dsrouter pid=8940 with android device and diagnostics tooling.
Start an application on android device with ONE of the following environment variables set:
[Default Tracing]
DOTNET_DiagnosticPorts=127.0.0.1:9000,nosuspend,connect
[Startup Tracing]
DOTNET_DiagnosticPorts=127.0.0.1:9000,suspend,connect
Run diagnotic tool connecting application on android device through dotnet-dsrouter pid=8940:
dotnet-trace collect -p 8940
See https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter for additional details and examples.
info: dotnet-dsrouter-8940[0]
Starting dotnet-dsrouter using pid=8940
fail: dotnet-dsrouter-8940[0]
Failed executing adb reverse --list. Error: An error occurred trying to start process 'adb' with working directory 'C:\Users\gmceaser'. The system cannot find the file specified.
fail: dotnet-dsrouter-8940[0]
Failed setting up adb port reverse. This might lead to problems communicating with Android application. Make sure env variable ANDROID_SDK_ROOT is set and points to an Android SDK. Executing with unknown adb status for port 9001.
info: dotnet-dsrouter-8940[0]
Starting IPC server (dotnet-diagnostic-dsrouter-8940) <--> TCP server (127.0.0.1:9001) router.
I have done some research and seen that I might need to set the location of my Android_SDK_Root. So I ran the following command:
set ANDROID_SDK_ROOT=C:\Users\gmceaser\AppData\Local\Android\Sdk
then tried again and I am getting the same errors. Does anyone know why I am getting these errors?