How to build plugin on Android? Why I got build error.

I have runtime plugin, it build and work fine on macosx, but can’t build on android, I just connect device and click launch button to launch game on android device, but got error msg like:

LogPlayLevel: In file included from
/…/Intermediate/Build/Android/UE4/Development/xxx_unreal/Module.xxx_unreal.cpp:2:
LogPlayLevel:
/…/Source/xxx_unreal/Private/LuaObject.cpp(10,28):
error: use of undeclared identifier
‘NewObject’ LogPlayLevel:
UObject* obj =
NewObject((UObject*)GetTransientPackage(),cls);
LogPlayLevel:
^ LogPlayLevel:
/…/Source/xxx_unreal/Private/LuaObject.cpp(10,38):
error: ‘UObject’ does not refer to a
value LogPlayLevel:
UObject* obj =
NewObject((UObject*)GetTransientPackage(),cls);
LogPlayLevel:
^ LogPlayLevel:
Runtime/Core/Public/Misc/DateTime.h(11,7):
note: declared here LogPlayLevel:
class UObject; LogPlayLevel: ^
LogPlayLevel: In file included from
/…/Intermediate/Build/Android/UE4/Development/xxx_unreal/Module.xxx_unreal.cpp:2:
LogPlayLevel:
/…/Source/xxx_unreal/Private/LuaObject.cpp(10,57):
error: use of undeclared identifier
‘GetTransientPackage’ LogPlayLevel:
UObject* obj =
NewObject((UObject*)GetTransientPackage(),cls);
LogPlayLevel:
^ LogPlayLevel:
/…/Source/xxx_unreal/Private/LuaObject.cpp(26,13):
error: use of undeclared identifier
‘FLogCategoryLogClass’; did you mean
‘FLogCategoryLogStats’? LogPlayLevel:
UE_LOG(LogClass, Log, TEXT(“type of %s
don’t suppor to push”),tn);
LogPlayLevel: ^
LogPlayLevel:
Runtime/Core/Public/Logging/LogMacros.h(155,186):
note: expanded from macro ‘UE_LOG’
LogPlayLevel:
CA_CONSTANT_IF((ELogVerbosity::Verbosity & ELogVerbosity::VerbosityMask) <=
ELogVerbosity::COMPILED_IN_MINIMUM_VERBOSITY
&& (ELogVerbosity::Warning &
ELogVerbosity::VerbosityMask) <=
FLogCategory##CategoryName::CompileTimeVerbosity)
\ LogPlayLevel:
^ LogPlayLevel: space>(133,1): note: expanded from
here LogPlayLevel:
FLogCategoryLogClass

I found missing symbols had been included in include “CoreMinimal.h”, why android can’t find them?
Any setting I should set?

I had fix this problem, just add some header to cpp like:

#include “UObject/UObjectGlobals.h”
#include “UObject/Class.h”
#include “UObject/UnrealType.h”
#include “UObject/Stack.h”

It works for me.