You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix "in-tree" usage of `$(AdbToolPath)` for projects which import
`Configuration.props`, e.g.
> cd samples/HelloWorld
> msbuild /t:Install
> msbuild /t:StartAndroidActivity
…
StartAndroidActivity:
PackageName: com.xamarin.android.helloworld
"…/android-toolchain/sdk/platform-toolsadb" shell am start -n "com.xamarin.android.helloworld/example.MainActivity"
/var/folders/j4/t8z2dw2d7pndmvwcxz71njf40000gn/T/tmp04a537baf06445baa371ef57689ad833.exec.cmd: line 2: …/android-toolchain/sdk/platform-toolsadb: No such file or directory
…/Xamarin.Android.Application.targets(27,5): error MSB3073: The command ""…/android-toolchain/sdk/platform-toolsadb" shell am start -n "com.xamarin.android.helloworld/example.MainActivity"" exited with code 127.
Done Building Project "…/xamarin-android/samples/HelloWorld/HelloWorld.csproj" (StartAndroidActivity target(s)) -- FAILED.
The problem is that a directory separator character is missing: what
*is* `…/platform-toolsadb` *should be* `…/platform-tools/adb`.
The cause is because the default value for `$(AdbToolPath)` within
`Configuration.props` packs a trailing `\`. Fix the default value,
and the `StartAndroidActivity` target works as intended.
Additionally, update `Xamarin.Android.Common.targets` and other
projects so that they consistently use `$(AdbToolPath)adb`, instead of
a mix of `$(AdbToolPath)adb` *and* `$(AdbToolPath)\adb`, as the latter
will hide such issues.
0 commit comments