# Build error 'Use of bitwise '&' '|' with boolean operands

**URL:** <https://forums.unrealengine.com/t/build-error-use-of-bitwise-with-boolean-operands/731576>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, question\
**Created:** [December 19, 2022, 8:04am UTC](https://forums.unrealengine.com/t/build-error-use-of-bitwise-with-boolean-operands/731576 "2022-12-19T08:04:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_7b0e724b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7b0e724b](https://forums.unrealengine.com/u/anonymous_user_7b0e724b)\
**Post date:** [December 19, 2022, 8:04am UTC](https://forums.unrealengine.com/t/build-error-use-of-bitwise-with-boolean-operands/731576/1 "2022-12-19T08:04:59Z")

</div>

Hi.  
I’m having following errors in building a game project using VRTemplate after building Unreal Engine 5.0.3 from source. Any comments will be helpful.

```auto
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): In file included from C:/UE/Engine/Source/Runtime/Core/Public/Logging/LogCategory.h:7:
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): C:/UE/Engine/Source/Runtime/Core/Public/UObject/NameTypes.h(545,10): warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): return (ComparisonIndex == Ename) & (GetNumber() == 0);
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): &&
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): C:/UE/Engine/Source/Runtime/Core/Public/UObject/NameTypes.h(545,10): note: cast one or both operands to int to silence this warning
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): C:/UE/Engine/Source/Runtime/Core/Public/UObject/NameTypes.h(550,10): warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): return (ComparisonIndex != Ename) | (GetNumber() != 0);
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ||
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): C:/UE/Engine/Source/Runtime/Core/Public/UObject/NameTypes.h(550,10): note: cast one or both operands to int to silence this warning
[2022.12.18-07.09.42:281][499]UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): 2 warnings generated.
[2022.12.18-07.09.42:281][499]PackagingResults: Warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
[2022.12.18-07.09.42:281][499]PackagingResults: Warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7b0e724b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7b0e724b](https://forums.unrealengine.com/u/anonymous_user_7b0e724b)\
**Post date:** [December 20, 2022, 7:59pm UTC](https://forums.unrealengine.com/t/build-error-use-of-bitwise-with-boolean-operands/731576/2 "2022-12-20T19:59:44Z")

</div>

I’ve fixed this error by matching correct version of toolchains such as NDK, Java, Android SDK. Originally it happened when I was building an application project after I rolled back to 5.03 from 5.1 which I built Unreal Engine successfully from source. And I found there were different tool chains between the versions.  
It’s gone in UE5.03 with JAVA jdk\_1.8.0\_311 instead of jdk-18.0.2.1. NDK is r21b with UE5.0.3

---

<div class="post-metadata">

**Author:** ![krgp321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@krgp321](https://forums.unrealengine.com/u/krgp321)\
**Post date:** [April 14, 2023, 11:27pm UTC](https://forums.unrealengine.com/t/build-error-use-of-bitwise-with-boolean-operands/731576/3 "2023-04-14T23:27:48Z")

</div>

hi I am having the same problem with my game when I am packaging it but I am on Mac in unreal 4.26 and a also in 5.1.1 If there is something I have to download could you send me a link

---

<div class="post-metadata">

**Author:** ![Thoeme](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thoeme](https://forums.unrealengine.com/u/Thoeme)\
**Post date:** [April 28, 2023, 2:47pm UTC](https://forums.unrealengine.com/t/build-error-use-of-bitwise-with-boolean-operands/731576/4 "2023-04-28T14:47:15Z")

</div>

same here
