We have never built for Android as our game is not going to be Android capable. However after creating 1 custom c++ class then trying to compile we get the following error:
AndroidInputInterface.h(12): [C1083] Cannot open include file: 'android/input.h': No such file or directory
I went in and uninstalled Android from the engine however that did not fix the issue either. I have been googling for 2 hours and everything is for people trying to compile for Android not those who don’t want Android. Like I said we havent done anything to include this and now it is throwing this error at compile time. I have literally compiled this project over a 1000 times.
Thanks in advance for any help!
Update
So why does these 2 files cause this error? This is procedural mesh code and I don’t include android or at least I don’t think I do and now am totally confused.
BasicShapes.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "ProceduralMeshComponent.h"
#include "SNodePanel.h"
#include "BasicShapes.generated.h"
UCLASS()
class ENDLESS_API ABasicShapes : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ABasicShapes();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ProcMesh|Mesh Parameters")
FVector CubeRadius = FVector(100.f, 100.f, 100.f);
protected:
UPROPERTY(VisibleAnywhere)
USceneComponent* ThisScene;
UPROPERTY(VisibleAnywhere)
UProceduralMeshComponent* ThisMesh;
virtual void PostActorCreated() override; //Triggers when you drag the Actor into the world or the game starts when it gets called.
virtual void PostLoad() override; //Triggers when you load the level.
void GenerateMesh();
private:
TArray<FVector>Verticies;
TArray<int32>Triangles;
TArray<FVector>Normals;
TArray<FProcMeshTangent>Tangents;
TArray<FVector2D>UVs;
TArray<FLinearColor>Colors;
//Top Left, Bottom Left, Top Right, Bottom Right
void AddTriangleMesh(FVector TopLeft, FVector BottomLeft, FVector BottomRight, int32 TriangleIndex, FProcMeshTangent Tangent);
};
BasicShapes.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "ProceduralMesh/BasicShapes.h"
#include "Engine.h"
#include "NavMesh/RecastNavMesh.h"
// Sets default values
ABasicShapes::ABasicShapes()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
//PrimaryActorTick.bCanEverTick = true;
ThisScene = CreateDefaultSubobject<USceneComponent>(TEXT("ROOT")); //Create Scene Component
RootComponent = ThisScene; //Create Root Component
ThisMesh = CreateDefaultSubobject<UProceduralMeshComponent>(TEXT("GeneratedMesh"));
ThisMesh->SetupAttachment(RootComponent); //Attaching the Mesh to the RootComponent;
}
void ABasicShapes::PostActorCreated()
{
Super::PostActorCreated();
GenerateMesh();
}
void ABasicShapes::PostLoad()
{
Super::PostLoad();
GenerateMesh();
}
void ABasicShapes::GenerateMesh()
{
//Everytime GenerateMesh is ran we have to reset all the below variables.
Verticies.Reset();
Verticies.Reset();
Triangles.Reset();
Normals.Reset();
Tangents.Reset();
UVs.Reset();
Colors.Reset();
//Local method variables for GenerateMesh method.
int32 TriangleIndexCount = 0;
FVector DefinedShape[3];
FProcMeshTangent TangentSetup;
}
void ABasicShapes::AddTriangleMesh(FVector TopLeft, FVector BottomLeft, FVector BottomRight, int32 TriangleIndex, FProcMeshTangent Tangent)
{
int32 Point1 = TriangleIndex++;
int32 Point2 = TriangleIndex++;
int32 Point3 = TriangleIndex++;
Verticies.Add(TopLeft);
Verticies.Add(BottomLeft);
Verticies.Add(BottomRight);
Triangles.Add(Point1);
Triangles.Add(Point2);
Triangles.Add(Point3);
FVector ThisNorm = FVector::CrossProduct(TopLeft, BottomRight).GetSafeNormal();
for(int i=0; i < 3; i++)
{
Normals.Add(ThisNorm);
Tangents.Add(Tangent);
Colors.Add(FLinearColor::Green);
}
UVs.Add(FVector2D(0.f, 1.f)); //Top Left
UVs.Add(FVector2D(0.f,0.f)); //Bottom Left
UVs.Add(FVector2D(1.f,0.f)); //Bottom Right
}