Error Launch failed! Unknown Error

Just playing around with UE 415 and Windows 10
When I’d like to run a new game first time on my usb connected Android I get the above error.
I can fix it myself when running the logged Command Adminstrator (which creates the needed file)

"…UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe" ue415tests Android Development -Project=…\ue415tests.uproject …\ue415tests.uproject -remoteini="…\ue415tests" -noxge -generatemanifest -NoHotReload

Before of that it’s problem is:

Access to path “…UE_4.15\Engine\Intermediate\Build\LastBuiltTargets.txt” was permitted

I don’t have any special access right on the ue install folder.

Later it fails on build with an ANT error which leads to a build failed (because of apk not generated)

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files…
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files…
[echo] ----------
[echo] Handling Resources…
[aapt] Generating resource IDs…
[aapt] …\ue415tests\Intermediate\Android\APK\JavaLibs\common_library\res\values-v21\values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name ‘@android:style/Theme.Material.Light.Dialog’.
[aapt]

Interesting - commenting the line

<style name="CardboardDialogTheme" parent="@android:style/Theme.Material.Light.Dialog"/>

in …\ue415tests\Intermediate\Android\APK\JavaLibs\common_library\res\values-v21\values.xml seems to fix it

Disabling the google vr plguin too :slight_smile:

yey - this fixes my other problem - when the plugin is enabled i don’t get a hud other than the default in “run in viewport” and “run in new window” - only in mobile preview - and it does the mobile preview always in stereo … bug or feature? :smiley:

Hello ,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Are your project settings setting set to package for Daydream under the Android section?
  1. Yes. Just create a new project and enable google cardboard vr plugin
  2. see above, run on phone/compile apk
  3. no special settings, only default one

=> Build fails with the access denied message because it tries to write a file under my programms folder where it should not write

ERROR: System.UnauthorizedAccessException: Der Zugriff auf den Pfad "D:\Games\Epic Games\UE_4.15\Engine\Intermediate\Build\LastBuiltTargets.txt" wurde verweigert.
   bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   bei System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   bei System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   bei UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments, FileReference ProjectFile)

After giving write permission to anybody to this file it works - but it should write in my project, not in my program folder!

UnrealBuildTool: [mergemanifest] Manifest merger disabled. Using project manifest only.
UnrealBuildTool: [echo] Handling aidl files…
UnrealBuildTool: [aidl] No AIDL files to compile.
UnrealBuildTool: [echo] ----------
UnrealBuildTool: [echo] Handling RenderScript files…
UnrealBuildTool: [echo] ----------
UnrealBuildTool: [echo] Handling Resources…
UnrealBuildTool: [aapt] Generating resource IDs…
UnrealBuildTool: [aapt] D:\Dev\Game\Tests\ue415cardboard\Intermediate\Android\APK\JavaLibs\common_library\res\values-v21\values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name ‘@android:style/Theme.Material.Light.Dialog’.
UnrealBuildTool: [aapt]
UnrealBuildTool:
UnrealBuildTool: BUILD FAILED

This happens even after disabling the plugin and restarting the editor! I need to manually clean the intermediate folder - then it works.

You need to use SDK API level android-24 with Daydream. Platform 24 (Android 7.0.0) SDK Platform needs to be installed with “SDK Manager.exe” in NVPack/android-sdk-windows. Easiest way to do this is the run it, hit “deselect all” at the bottom, then open Android 7.0 (API 24) and select SDK Platform. Hit install. Could you try this and let me know if your project still fails to build?

Thank you this makes perfectly sense! Sorry, I can’t test, I’m targeting older Android at the moment and can’t risk to destruct my setup :slight_smile:
But still there is the error that UE does try to write to the file “LastBuiltTargets.txt” in the program folder, this is not ok and doesn’t depend on Android SDK I think. Can you verify this?