Can't add C++ class in my existing blueprint project

This is the error I get:

In text:

ERROR: f:\Unreal Engine Projects\BoxMobile\Intermediate\Source\BoxMobile.Target.cs(6,14) : error CS0101: De naamruimte <globale naamruimte> bevat al een definitie voor BoxMobileTarget
ERROR: UnrealBuildTool Exception: Unable to compile source files.

globale naamruimte is a global namespace, it says that it already contains a definition for BoxMobileTarget.

I never added a C++ class before though.

How do I fix it?

Maybe there is such a class name n the engine.
can you create a class with another random name?

I found out what is your issue.

Okay so the name of your project is “BoxMobile”
Unreal engine always creates a class name ProjectName+Target. in your case it is BoxMobileTarget. it is kept in the source directory . under ProjectName.Target.cs and it takes care compilation specific features of your project. it is a C# file but still, you can’t have a class with the same name.

Another class that will be created automatically is ProjectName+Editor+Target which in your case is “BoxMobileEditorTarget”

In short, you need to use another name