# Cannot not be compiled. Try rebuilding from source mannually! - Giving errors in Visual Studio

**URL:** <https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204>\
**Category:** C++\
**Tags:** unreal-engine, crash, editor, question\
**Created:** [May 11, 2023, 6:31am UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204 "2023-05-11T06:31:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 6:31am UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/1 "2023-05-11T06:31:24Z")

</div>

I was installing a third party plugin to fix Android 12 issue for google console as per new policy. I created a new folder as “Plugins” and paste my plugin folder there. And I opened my project, I’ve manually enabled my plugin and restart the editor. The next time when my project opens I got this

![error 1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/1/711954208856fbd18d5d8262f2fe196bf2458484.png)

when I clicked yes it tried to rebuild but unsuccessful and gave this error

![Error 2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/9/6e94b801de0e896bbedd6876da9925745eb7bcc4.png)

I saw some youtube tutorial so I right click on my project file and clicked “Generate Visual Studio Project Files”  
And then I got an sln file and I opened it with visual studio and tried to build my file by ctrl+shift+b as per youtube tutorials I got 2 errors.  
![visual studio error|690x376]

 ![visual studio error](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/1/2315e3e66658e93d16623a7dce8cc78d5f6dade9.png)

Please help me fix these error, I spend my time more than 8 months on this project and I completed my project but this happens.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 9:37am UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/2 "2023-05-11T09:37:41Z")

</div>

Perhaps you need to compile the plugin manually. This is a step that is not done automatically by vs. You need to open the plugins folder in the solution explorer and compile it manually. You should be able to build that specific folder separately from the project (it has it’s own build file).

This may fix the problem, but if it was built for another version of the engine besides your 4.27 then you might need to update deprecated code to get it up to your version standards.

Also make sure you have all of the android SDK setup correctly

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/8/6881e4e60d8401839ab60e2a3acab829882b97b2.jpeg "How To Install Android Studio, SDK, NDK For Unreal Engine 4.27, Make VR Games for Meta Quest 2") ](https://www.youtube.com/watch?v=_glVA42GRy4)

Could you either pack the plugin folder or send a link to the android fix repository or source? I could then test if it compiles and runs on 4.27 on my end.

is it this by any chance?

> **[GitHub - Flakky/Unreal-Android-Manifest-Fix-Plugin](https://github.com/Flakky/Unreal-Android-Manifest-Fix-Plugin/tree/main)**
>
> main

Did you put it in the correct directory? It compile fine on my pc.

 ![fix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/e/01e2a432f69781589cc1a45d0406057f021c2295.png)

Here is a packed version of my plugins folder just in case. Perhaps you unpacked the cloned source with the extra directory?

[Plugins.zip](https://forums.unrealengine.com/uploads/short-url/tkRDAkUJbzZMGciR10uYJ2o39T6.zip) (7.9 MB)

Also be sure to delete the folders

- binaries
- intermediate
- derivedDataCache
- saved
- .vs  
And the projectName.sln file

The right click your uproject file and choose  
“Generate Visual Studio project files”

Then run the .sln file and compile the project from within visual studio.  
It should run the editor with your project and the plugin should be ready to load.

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 11:02am UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/3 "2023-05-11T11:02:01Z")

</div>

The plugin you gave me link of, yes I am using that one. But as I am new to Unreal engine and doing this first time I dont know how to compile plugin manually. I have setup my sdk ndk properly .I am using UE4.27, I have tried deleting all binaries folder from the project but still giving me the same error when building on visual studio.  
I even replaced my android12fix plugin with your given plugin zip file but didn’t worked. And now its not even showing plugin name in the error. Rampit is my game name in case if you get confused.

![error2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/8/488969fd10879f4fae7e4b309ec5aa6a6a980f5f.png)

In case you need to check my logs from save folder of my project here it is:

[RampIt.log](https://forums.unrealengine.com/uploads/short-url/842Ykqm4ki5qjEQkcx0Nozr9cUq.log) (12.9 KB)  
[UnrealVersionSelector-2023.05.11-16.14.28.log](https://forums.unrealengine.com/uploads/short-url/2ECjYEe07nKEqFFpz9tktyZEiLk.log) (32.6 KB)

Could you please tell me how to compile plugins manually as you said, may it will work.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 11:16am UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/4 "2023-05-11T11:16:41Z")

</div>

But it seems from your post that it is not having problems with the plugin directly but with the project.

Have you switched engine versions during the development process? (upgrade or downgraded)

If so then deleting the folders I mentioned and rebuilding should also help.

The plugin doesn’t seem to have all the files to do a separate compile, but it does compile with the project so maybe it doesn’t need the extra configuration.

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 11:28am UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/5 "2023-05-11T11:28:54Z")

</div>

No I haven’t switch Engine version while development. I guess using your plugin file fixed my plugin build issue but having a new error in visual studio. Please guide me if you know how to fix.

 ![error4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/9/7/197275abd33ca575b148272c69bb9365c4b1685f.png)

As you can see its telling me to add a line in a file. I’ve found that file but as I have no coding experience could you tell me where I should add this line?

And also what about the second error?

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 11:37am UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/6 "2023-05-11T11:37:35Z")

</div>

As I could remember the second error is most probably because of the unsuccessful build in command prompt. I saw this video and did what he told.  
Video Link:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/b/c9b9a679442ab616d13da493c7e8457507ae1e73.jpeg "Recompile Unreal Plugin to new Engine Version (In About a Minute)") ](https://www.youtube.com/watch?v=sC0gnfYzFzU)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 12:01pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/7 "2023-05-11T12:01:02Z")

</div>

You could try modifying the .Target.cs files in you project adding `bPrecompile = true;`

For both YourProjectName .Target.cs and YourProjectName Editor.Target.cs

```auto
// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class YourProjectNameTarget : TargetRules
{
	public YourProjectNameTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		DefaultBuildSettings = BuildSettingsVersion.V2;

		ExtraModuleNames.AddRange( new string[] { "YourProjectName" } 

		bPrecompile = true;
);

	}
}

```

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 12:33pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/8 "2023-05-11T12:33:23Z")

</div>

Nope, doesn’t worked. Now I cant even generate project file of my project show this error:

 ![error5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/2/ec225c9160f884048bf7f41bf51218a27ec4df48.png)  
 ![notpad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/a/7/0a7135832203bbe7d785e126abc1702da103f7ac.png)

so I undo the line.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 12:39pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/9 "2023-05-11T12:39:32Z")

</div>

Edit: You put the `bPrecompile = true;` in the wrong place

here is an example of a proper target file:

```auto
using UnrealBuildTool;
using System.Collections.Generic;

public class NavigateCornerEditorTarget : TargetRules
{
	public NavigateCornerEditorTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Editor;
		DefaultBuildSettings = BuildSettingsVersion.V2;

		ExtraModuleNames.AddRange( new string[] { "NavigateCorner" } );

        bPrecompile = true;
    }
}

```

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 12:49pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/10 "2023-05-11T12:49:01Z")

</div>

Ok I did it and I got not error but when I build my project in visual studio I got error:

 ![error6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/e/9ce07da944f1717d4e01364d33631ed2b3e33ed8.png)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 12:53pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/11 "2023-05-11T12:53:56Z")

</div>

See if commenting out “AndroidAvertising” from the extra modules helps.

If I try to add it to my build file in the dependencies it causes the build to fail.  
Perhaps the problem lies in the uproject file internal settings?

Could you post what is there?

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 12:56pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/12 "2023-05-11T12:56:54Z")

</div>

how can I post internal settings I dont know. Tell me how to I will post it.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 12:58pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/13 "2023-05-11T12:58:02Z")

</div>

Just open up the uproject file in notepad. It’s a human readable text file.

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 12:59pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/14 "2023-05-11T12:59:07Z")

</div>

Do You mean this one?  
 ![dd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/9/029ffb194e022b8572914a4fb919a2f4858819b2.png)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 12:59pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/15 "2023-05-11T12:59:19Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 1:00pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/16 "2023-05-11T13:00:43Z")

</div>

Here you go:

[RampIt Text.txt](https://forums.unrealengine.com/uploads/short-url/zR6MvzgSziBdwLL33fTCk4jAnUF.txt) (2.1 KB)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 1:12pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/17 "2023-05-11T13:12:30Z")

</div>

My configuration in the uproject is minimal even though the plugin is enabled

```auto
{
	"FileVersion": 3,
	"EngineAssociation": "4.27",
	"Category": "",
	"Description": "",
	"Modules": [
		{
			"Name": "NavigateCorner",
			"Type": "Runtime",
			"LoadingPhase": "Default"
		}
	]
}

```

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 1:13pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/18 "2023-05-11T13:13:37Z")

</div>

wtf but can It be the problem?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 11, 2023, 1:14pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/19 "2023-05-11T13:14:59Z")

</div>

I’m installing android studio and will try a basic project to see it it compiles for Android with the plugin (I usually code for desktop)

---

<div class="post-metadata">

**Author:** ![Anqeror](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anqeror](https://forums.unrealengine.com/u/Anqeror)\
**Post date:** [May 11, 2023, 1:18pm UTC](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204/20 "2023-05-11T13:18:01Z")

</div>

Ok, thank you for your efforts. Till then I’ll go through the internet to solve this error. Reply this post If you finds something.

[Next page](https://forums.unrealengine.com/t/cannot-not-be-compiled-try-rebuilding-from-source-mannually-giving-errors-in-visual-studio/1162204.md?page=2)
