bazel: Build Android on Windows: Bazel_tools//src/main/native/windows:windows_jni.dll' failed (Exit -1)

Description of the problem :

I have Bazel Android project for Windows. When I open and try to sync project I got error. On mac this step works normal.

Log

ERROR:

C:/users/dmitry/_bazel_dmitry/f5rza2b6/external/bazel_tools/src/main/native/windows/BUILD:49:1: Couldn't build file external/bazel_tools/src/main/native/windows/_objs/windows_jni.dll/processes-jni.obj: C++ compilation of rule '@bazel_tools//src/main/native/windows:windows_jni.dll' failed (Exit -1).
 
The target you are compiling requires Visual C++ build tools. 
Bazel couldn't find a valid Visual C++ build tools installation on your machine. 
Please check your installation following https://docs.bazel.build/versions/master/windows.html#using 

What operating system are you running Bazel on?

Windows 7

What’s the output of bazel info release?

0.17.1

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 24 (14 by maintainers)

Most upvoted comments

@meteorcloudy
I remove VS 2017, install VS 2015 from link and change BAZEL_VC , BAZEL_VS and it works now!