I am using a thirdparty of library in android.I write the project of build.cs as follows
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.IO;
public class androidtest2 : ModuleRules
{
public androidtest2(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG"});
//PrivateDependencyModuleNames.AddRange(new string[] { });
PublicIncludePaths.Add("E:/Program Files (x86)/Epic Games/4.11/Engine/Source/Runtime/Launch/Public");
PrivateIncludePaths.Add("E:/Program Files (x86)/Epic Games/4.11/Engine/Source/Runtime/Launch/Private");
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
// {
// if (UEBuildConfiguration.bCompileSteamOSS == true)
// {
// DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
// }
// }
if (Target.Platform == UnrealTargetPlatform.Android)
{
PublicIncludePaths.AddRange(new string[] { "Core" });
PublicIncludePaths.Add("E:/NVPACK/android-ndk-r10e/platforms/android-19/arch-arm/usr/include");
// PrivateIncludePaths.Add("/Source/Runtime/Launch/Private");
LoadBobsMagic(Target);
}
}
private string ThirdPartyPath
{
get { return Path.GetFullPath("F:/ueproject/androidtest2/ThirdParty/"); }
}
public bool LoadBobsMagic(TargetInfo Target)
{
bool isLibrarySupported = false;
if (Target.Platform == UnrealTargetPlatform.Android)
{
isLibrarySupported = true;
string LibrariesPath = Path.Combine(ThirdPartyPath, "tango_client_api", "lib");
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtango_client_api.so"));
}
if (isLibrarySupported)
{
// Include path
PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "tango_client_api", "include"));
}
//Definitions.Add(string.Format("WITH_LIBZPLAY_BINDING={0}", isLibrarySupported ? 1 : 0));
return isLibrarySupported;
}
}
It builded success and installed on my phone.However,it lanched failed.There is the error log as follows
[link text][1]
How can I fix the error? Many Thanks!
By the way I also change the android.mk file in
‘E:\Program Files (x86)\Epic Games\4.11\Engine\Build\Android\Java\jni’
and add this code
include $(CLEAR_VARS)
LOCAL_MODULE := tango_client_api
LOCAL_SRC_FILES := libtango_client_api.so
include $(PREBUILT_SHARED_LIBRARY)
it is also not work!
[1]: 103158-log.txt (2.35 KB)