4.18 P2 Android Packaging Fails with ARCore Plugin Enabled

Hi there

As the title states, I’ve been trying to mess around with ARCore but have had very little luck getting a project to Package with the ARCore Plugin enabled. I downloaded the Tappy Chicken demo project, updated it to 4.18, and was able to package it no problem. Below you can find the steps I took trying to set up the ARCore project.

  • Create a new, blank Mobile/Tablet
    Scalable 3D or 2D project without
    starter content
  • Go to the Plugins window and enable the “Google ARCore” plugin
  • Create a new Blueprint Pawn and add a camera
  • Select the camera and scroll down to PostProcess Materials and add the GoogleARCorePassthroughCamera material
  • Compile and save
  • Create a new blueprint gamemode class and set the default pawn to the blueprint we just created
  • Compile and save
  • Go to File > New Level and create a new empty level
  • Save the level
  • Add the pawn to the level at 0,0,0, and set “Auto Possess Player” to “Player 0”
  • Add a directional light to the level
  • Go to Project Settings and check “Start in AR”
  • Go to Maps & Modes and set the gamemode to the mode we created, and set the Startup and Default maps to the level we created
  • Go to Android and hit “Configure Now”

From there, you can package the project for Android (I chose ETC2) and, if your experience is anything like mine, it will conclude with “PackagingResults: Error: Unknown Error”

I’ve posted the whole UAT_Log.txt [HERE][1] for your viewing pleasure.

I think the area of importance is at the end:

====9/26/2017 11:22:14 AM====PERFORMING FINAL APK PACKAGE OPERATION================================================
Fixing minSdkVersion; NDK level above 19 requires minSdkVersion of 21 (arch=armv7)
Creating rungradle.bat to work around commandline length limit (using unused drive letter Y:)
Making .apk with Gradle...
Observed package id 'build-tools;25.0.3' in inconsistent location 'D:\NVPACK\android-sdk-windows\build-tools\android-7.1.1' (Expected 'D:\NVPACK\android-sdk-windows\build-tools\25.0.3')
Observed package id 'build-tools;25.0.3' in inconsistent location 'D:\NVPACK\android-sdk-windows\build-tools\android-7.1.1' (Expected 'D:\NVPACK\android-sdk-windows\build-tools\25.0.3')
Incremental java compilation is an incubating feature.
Observed package id 'build-tools;25.0.3' in inconsistent location 'D:\NVPACK\android-sdk-windows\build-tools\android-7.1.1' (Expected 'D:\NVPACK\android-sdk-windows\build-tools\25.0.3')
File C:\Users\Workstation 2\.android\repositories.cfg could not be loaded.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not find com.google.tango:lighting_estimation:0.0.0.
     Required by:
         :app:unspecified
   > Could not find com.google.tango:tango_java_lib:0.0.0.
     Required by:
         :app:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 23.789 secs
ERROR: cmd.exe failed with args /c "D:\Perforce\ARTest\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleDebug
       (see C:\Users\Workstation 2\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Epic+Games+UE_4.18\UAT_Log.txt for full exception trace)
AutomationTool exiting with ExitCode=1 (Error_Unknown)
BUILD FAILED
PackagingResults: Error: Unknown Error

You can also see my SDK setup below, though I doubt that’s the issue.

I’ll be honest, I’m kinda flying blind here with all this ARCore stuff. My whole workflow is copied form an ARKit post in hopes that the process is more and less the same (AR unification and all that jazz). I’d love any feedback that could steer me in the right direction.

Thanks

EDIT: Checked again on Preview 2 and the issue persists.

Ignoring ARCore, have you ever had Android successfully package?
The “inconsistent” install locations hints that maybe your SDK is not installed properly or up to date? I found that I had to 100% uninstall and reinstall NVPACK and double check that those paths were pointing to the correct spots.

I downloaded the Tappy Chicken demo project, updated it to 4.18, and was able to package it no problem. I’ve also uninstalled and reinstalled the SDK through CodeWorks 3 times this week. If the file path is the issue, it’s an Unreal issue, because that is the path CodeWorks gave me.

I just tested with 4.18 preview and it works fine for source build. You do need to set the Minimum SDK version to 19 in Android project settings, though.

Looking at your SDK settings you have an error the with NDK; it should be android-19, not latest.

It looks like the TangoSDK is missing from the launcher release; I’ll see about getting this fixed.

So I changed the NDK API-Level to android-19, set the minimum SDK Level to 19 and the target SDK level to 24 (though I also tried 19) and the build still fails. I also tried changing the SDK API Level under platforms to android-19 without success.

I’m no expert, but I have to assume that it has something to do with this:

A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not find com.google.tango:lighting_estimation:0.0.0.
     Required by:
         :app:unspecified
   > Could not find com.google.tango:tango_java_lib:0.0.0.
     Required by:
         :app:unspecified

Either that or:

Observed package id 'build-tools;25.0.3' in inconsistent location 'D:\NVPACK\android-sdk-windows\build-tools\android-7.1.1' (Expected 'D:\NVPACK\android-sdk-windows\build-tools\25.0.3')

No, that is because the actual tango_java_lib and lighting_estimation binary files are missing from the release. Preview #3 should fix this.

Gotcha, then I anxiously await it’s release! Thanks for your help.

Morning Chris is there estimated release date on when 4.18 preview 3 be available, possibly somewhere in October? :slight_smile: curious

I tested this steps on ARCore preview branch of 4.17.1 and seems to work as expected. I am using Windows with VS 2015

I am getting this issue in 4.18 preview 4 still. Did you guys manage to solve it?

Unchecking Gradle Worked for me. Just go to Project Settings > Platforms: Android and uncheck Enable Gradle instead of Ant.

222477-mf.png

Apparent Gradle is considered to be one of the worst Java compilers out there, not really sure why UE checks it by default.

I might have solved it.

I was facing the same promises,
I’ll tie the:
Enable Gradle instead of Ant
And the NDK API Lelel (spcific version or lastest) for: "lastest

and finally I was able to compile the app.
good luck