Error LNK1181 and error MSB3073 while building android project,Help! i got 2 errors in visual studio (LNK1181 cannot open input file)(MSB3073)

im making a android game and while i was trying to get ads to work these errors came

1 error LNK1181 cannot open input file ‘C:\Program Files\Epic Games\UE_4.26\Engine\Intermediate\Build\Win64\UE4Editor\Development\AndroidAdvertising\UE4Editor-AndroidAdvertising.lib’

2 error MSB3073 rity CThe command ““C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat” BeansHunterEditor Win64 Development -Project=“C:\Users****\Documents\Unreal Projects\BeansHunter\BeansHunter.uproject” -WaitMutex -FromMsBuild” exited with code 6

i have also tried removing binaries and intermediate but that didnt help

1 Like

Did you fix this?

I had the same problem, it was caused by line PrivateDependencyModuleNames.Add("AndroidAdvertising"); in *build.cs file. I solved it by adding it only for Android platform:

if (Target.Platform == UnrealTargetPlatform.Android) {
  PrivateDependencyModuleNames.Add(AndroidAdvertising);
}
2 Likes

That helped me to build, Thanks!
I think you forgot to add apostrophe “AndroidAdvertising”