Android for Distribution - Packaging Fails - FileNotFound

Hey, I’ve been trying to get an Android apk ready to distribute, but every time I set the ‘For Distribution’ option to true the packaging fails. Packaging Development or Shipping with for distribution set to false works fine.

The only error I can see in the log is a FileNotFoundException for “[PROJECT PATH]\Intermediate/Android/APK/bin/[PROJECT NAME]-release.apk”.

Log file here

I’ve looked around and though many people have had a similar issue, I haven’t found a solution that works for me.

Some notes:

  • I’ve tried packing with Codeworks 1R5 and 1R4u2 and set SDK folder locations in the Project Settings each time

  • I’m using Google VR for Cardboard functionality

  • I generated a keystore file that matches with information input in Project Settings, it’s currently located in ProjectFolder > Build > Android

Am I missing something?

Hey Shobhitthackar, thanks for the response! The issue only occurs when ‘For Distribution’ is ticked. However, I’ve rechecked and recreated keys a number of times with no luck. All the information in Project Settings matches the keystore name, alias and passwords.

I actually just managed to create a package with for distribution and installed on phone successfully a few times with a blank project. I then turned on ‘Google VR’ plugin and tried to repackage and I get this error again. Even after I disable the plugin it remains unable to package; somehow it causes a permanent problem with the project.

Have you tried using Google VR at all?

Hey man to recheck the distribution settings. Try packaging without for-distribution checkbox. If the packaging succeeds, the problem lies with the distribution settings. Check out my answer in this post for the above reason.

link text

Make sure your SDK is correctly set up.

No, I haven’t done any VR stuff yet. So sadly this is where my helpline ends :D. Sorry, hope you find a resolution asap.

I found the answer here:

Turns out it was a problem with packaging for distribution with GoogleVR. It’s important to ensure you download the newest version of proguard and replace as shown in this video: Unreal Engine 4 GoogleVR packaging for distribution - YouTube

It’s definitely very finicky, I’m hoping moving over to 4.15 will improve things.