x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Trouble packaging Google VR project for Android. For Distribution

I have successfully launch my project on my android device and package my project when I set my Build Configuration to development. When I set my project for Distribution the packaging fails. Please help.

I have also created a new project and still the same error.

my log file for API version 21

my log file for API version 23

 ===PERFORMING FINAL APK PACKAGE OPERATION================================================
 
 UATHelper: Packaging (Android (ATC)): UEDeployAndroid.RunCommandLineProgramAndReturnResult: Making .apk with Ant... (note: it's safe to ignore javac obsolete warnings)
 
 UATHelper: Packaging (Android (ATC)): Duplicated project name in import. Project custom_rules defined first in Z:\custom_rules.xml and again in Z:\JavaLibs\common_library\custom_rules.xml
 
 UATHelper: Packaging (Android (ATC)):     [javac] Note: Some input files use or override a deprecated API.
 
 UATHelper: Packaging (Android (ATC)):     [javac] Note: Recompile with -Xlint:deprecation for details.
 
 UATHelper: Packaging (Android (ATC)):  [proguard] Warning: com.google.vr.cardboard.AndroidNCompat: can't find referenced method 'void setVrModeEnabled(boolean,android.content.ComponentName)' in class android.app.Activity
 
 UATHelper: Packaging (Android (ATC)):  [proguard] Warning: com.google.vr.cardboard.AndroidNCompat: can't find referenced method 'boolean isSustainedPerformanceModeSupported()' in class android.os.PowerManager
 
 UATHelper: Packaging (Android (ATC)):  [proguard] Warning: com.google.vr.cardboard.AndroidNCompat: can't find referenced method 'void setSustainedPerformanceMode(boolean)' in class android.view.Window
 
 UATHelper: Packaging (Android (ATC)):  [proguard] Warning: com.google.vr.cardboard.StoragePermissionUtils: can't find referenced method 'void requestPermissions(java.lang.String[],int)' in class android.app.Activity
 
 UATHelper: Packaging (Android (ATC)):  [proguard] Warning: com.google.vr.cardboard.StoragePermissionUtils: can't find referenced method 'int checkSelfPermission(java.lang.String)' in class android.content.Context
 
 UATHelper: Packaging (Android (ATC)):  [proguard]       You should check if you need to specify additional program jars.
 
 UATHelper: Packaging (Android (ATC)):  [proguard] Warning: there were 5 unresolved references to program class members.
 
 UATHelper: Packaging (Android (ATC)):  [proguard]          Your input classes appear to be inconsistent.
 
 UATHelper: Packaging (Android (ATC)):  [proguard]          You may need to recompile them and try again.
 
 UATHelper: Packaging (Android (ATC)):  [proguard]          Alternatively, you may have to specify the option 
 
 UATHelper: Packaging (Android (ATC)):  [proguard]          '-dontskipnonpubliclibraryclassmembers'.
 
 UATHelper: Packaging (Android (ATC)): BUILD FAILED
 
 UATHelper: Packaging (Android (ATC)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:871: Please correct the above warnings first.


Product Version: UE 4.13
Tags:
more ▼

asked Oct 12 '16 at 03:50 PM in Packaging & Deployment

avatar image

MrKewer
43 1 4 6

avatar image jined Nov 08 '16 at 09:55 PM

I've got the same exact problem and was introduced after 4.13.1, and it still on 4.13.2...

I've reported it on the Unreal forum:

https://forums.unrealengine.com/showthread.php?128089-4-13-2-Google-VR-Unable-to-build-Android-shipping

avatar image ambershee Nov 10 '16 at 04:50 PM

We're in 4.13.2 and have also encountered being unable to package builds for distribution (API version 21).

Logging isn't the same, but it is similar. I'd attach the file, but Answerhub seems to be having some sort of issues right now.

avatar image MrKewer Nov 19 '16 at 09:06 PM

I have downloaded UE 4.14 today and tried packaging a new project, but same problem.

avatar image n3d057upn1 Nov 24 '16 at 03:50 PM

I successfully package my Google VR game for distribution, with 4.14 engine version. I will make some tutorial soon, after few more testing.

avatar image ambershee Nov 24 '16 at 03:52 PM

That would be really handy - I appreciate you taking the time to do a write up!

avatar image MrKewer Nov 24 '16 at 04:04 PM

Thank you! n3d057upn1. Cant wait to see the tutorial. Appreciate it a lot.

avatar image jined Feb 14 '17 at 11:38 AM

Watch out before changing "so lightly" the NDK api, as long as NDK is responsible of the Arm7 / 64bit code of the executable, so, compiling with a specific version of NDK, will make the app incompatible with a spread range of Arm devices, expecially Arm7 devices.

For example, NDK <20 is unable to generate arm64 code, and NDK >20, will generate arm64 apps, that will not be down compatible with arm7, unless you include both code into the app... but the size would be extremely bigger, also, by my experience the arm7/64 supporting options inside the Ue4 project settings, came quite buggy... but mostly becase of the continued updates of the Android sdk.

Keep in mind that 64bit devices, will run arm7/64 code, but arm7 devices, will NOT, run arm64 code.

By this, is very common to generate apps that run fine on Galaxy S6/7 but wont of a spread range of devices, and opposite, several common compatible apps, wont run o S7, because its priority in executing 64bit code (so it is a buggy exec management).

My suggestion is to test the app both on a arm64bit and on a arm7, devices, every time you put hand on ndk.

Sorry my typos mistake, im french.

avatar image RVillani Feb 14 '17 at 12:06 PM

Nice tips!
So it's like windows: 64 can run 32/64 apps. 32 can only run 32 apps. 32 being the arm7 equivalent in Android. I've been doing different texture compiles for a game (ATC, ETC2 etc) and uploading the different versions to PlayStore. That way, it keeps the file smaller. I never understood though that difference from the arm7 to 64bit. I'll double my game versions on PlayStore, now! XD

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

5 answers: sort voted first

I've managed to do it!!

  • I'm using Unreal Engine 4.14

  • Following @n3d057upn1 video, I replaced ProGuard with the recent version.

  • A bit differently from the video, in the SDK Manager I installed only SDK Platform and Google APIs from the APIs 22 to 24. alt text

  • In Project Settings > Platforms > Android > APKPackaging I set Minimum SDK Version = 21 and Target SDK Version = 24 alt text

  • On the same page, at the Advanced APKPackaging section I set Configure GoogleVR Deployment Mode = Cardboard alt text

  • At the Distribution Signing section I setup my keystore

  • In Project Settings > Platforms > Android SDK I set SDK API Level = android-24, as in the video, BUT I set NDK API Level = android-19. alt text

I read elsewhere here on Answers that it doesn't matter if the NDK Level is less than the SDK one. And, as it is the C++ part, I thought it was causing the crash on startup (I had that) because of incompatibilities with UE4's C++ code. Setting it back to the old and known android-19 worked. Packaged and Launched successfully!

ue_settings_1.png (73.0 kB)
ue_settings_2.png (77.4 kB)
ue_settings_3.png (140.4 kB)
ue_settings_4.png (84.0 kB)
more ▼

answered Dec 07 '16 at 04:17 PM

avatar image

RVillani
1.1k 28 39 90

avatar image MrKewer Dec 07 '16 at 07:01 PM

You and n3d057upn1 are my heroes! This works!

avatar image iKeepBelieving Dec 07 '16 at 07:46 PM

But, what is the real diffrence from the video? It was crashing on startup on some devices (not mine) ( only android 6.0 devices? ). And if we set NDK Level to api-19 from api-24 it will stop crashing? P.S. I would really love target SDK=21 (22?) solution. cause target SDK>21 (22?) causes known issue with OBB on Android 6.0. https://code.google.com/p/android/issues/detail?id=197287

avatar image RVillani Dec 07 '16 at 09:15 PM

@MrKewer, glad it helped! @LifeGrapher, The only differences from the video are:

  • I downloaded less content in the SDK manager

  • NDK API set to android-19. Changing only that stopped the crashing on launch. As I said, probably because with >19 there are incompatibilities between UE's and NDK's native codes.

About the issue, maybe it was corrected with target SDK 24, because I didn't have any trouble.

avatar image RVillani Dec 12 '16 at 03:30 AM

@LifeGrapher, You were right. I didn't have any trouble on my Nexus 5, even installing from Google Play, but on Samsung phones I always get the XAPK Validation Failed error.

@tim_hobson, is there a fix for it? I heard there was a modified OBB downloader in 4.14 that fixes this issue with API 23/24. How do we use it?

avatar image MrKewer Dec 21 '16 at 05:24 PM

Hi I have finally launched my first game please check it out. https://play.google.com/store/apps/details?id=com.MrKewer.VRRunner

@LifeGrapher, I have also received XAPK Validation Failed error but then I ticked the Disable verify OBB on first start/update and it works now. Also make sure when testing on the device that you delete everything before you install from the play store. Only problem I have is that when I install my game the permissions to the storage is automatically disabled and have to enable it to be able to save the game.

Please check out my game and let me know if everything is working. I don't mind if you click on the ads and install another app. :)

avatar image RVillani Jan 25 '17 at 04:48 PM

That's nice, MrKewer! Did you get it to work on Samsung devices like the S5/6/7? 'Cause I can't :(

Also, I installed your game. It's cool! But 0.5GB?! XD If you want help on reducing that size let me know.

avatar image MrKewer Jan 25 '17 at 05:44 PM

Hi RVillani, thanks. Yes I did manage to get it working on my Samsung S4 mini (rooted) and tested on S6 as well. I'm going to try to do all these steps from scratch on a different computer and then I will let you know when I package it.

Can you help me reduce the size? I did check the "Create compressed cooked packages". For the game I'm creating now, I scaled all the textures down to 512x512, which seems to help a lot, but is there another way?

avatar image Osiris2000 Feb 14 '17 at 11:57 AM

This one is worked for me. Replacing Proguard with a new version was critical. 4.14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The video is not that good, but I hope it will help. https://www.youtube.com/watch?v=kF2SkkNA4Cs Pls. support me by downloading my first app. The link is in the video description.

more ▼

answered Nov 25 '16 at 12:51 AM

avatar image

n3d057upn1
16 1 1

avatar image MrKewer Nov 26 '16 at 08:53 AM

Hi n3d057upn1. This build successfully only on api 24, but it crashes on my phone(s4 mini) and tested on other phone(s6 edge) and crashes as well, both using the marshmallow version. I have downloaded your game as well but it crash too. Have you tested your game on other devices like the samsung s6 maybe?

avatar image n3d057upn1 Nov 26 '16 at 09:06 AM

I tested it only on Xaiomi redmi note 3. Try to turn off mobile HDR (in engine > rendering). Let me know if it works.

avatar image aussieburger Nov 26 '16 at 10:06 AM

What version of android is running on each device you tested on?

avatar image MrKewer Nov 26 '16 at 12:41 PM

I have tested it on version 6.0.1 (samsung s6 edge) and on my s4 mini its also version 6.0.1, but I have rooted my phone and installed a CyanogenMod version. Does it work on your device aussieburger?

avatar image aussieburger Nov 26 '16 at 03:02 PM

S7 edge 6.0.1 also crashes straight on startup :(

avatar image n3d057upn1 Nov 26 '16 at 03:12 PM

Same with S3

avatar image iKeepBelieving Nov 26 '16 at 06:14 PM

Crashing on start up is another problem i guess) At least it packaged)

avatar image n3d057upn1 Nov 26 '16 at 06:19 PM

Are you also using Samsung? I can run game on my Xaiomi without any problem. I will install some emulator for Samsung and try something.

avatar image MrKewer Dec 04 '16 at 08:12 AM

Have anyone solve the problem yet? I've been busy with other work, going to check if I can get something during the week.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi Mrkewer,

Can you provide the full project log from the build that you tried? Also, does this same project package if you disable GoogleVR? If it's still failing have you set up your Manifest file and distribution for the key store? Without this packaging with distribution will have issues. If you've not set this up try following the documentation here: https://docs.unrealengine.com/latest/INT/Platforms/Android/DistributionSigning/

Thanks!

Tim

more ▼

answered Oct 24 '16 at 06:50 PM

avatar image

Tim Hobson ♦♦ STAFF
48.8k 887 101 878

avatar image MrKewer Oct 25 '16 at 12:10 AM

Hi Tim,

Thanks for helping me. I have build the project with disabling the GoogleVR plugin and it does build. I have created a few new projects to try it out but no luck. (so the log files differ a bit from the top post ).

I have upgraded my CodeWorks for Android to version 1R4u2 and I still cant seem to package it. I have notice that one of the errors I've getting setSustainedPerformanceMode is added in API level 24: https://developer.android.com/reference/android/view/Window.html#setSustainedPerformanceMode(boolean)

and I think this one as well setVrModeEnabled: https://developer.android.com/reference/android/service/vr/VrListenerService.html

Then I upgraded my CodeWorks to 1R5 because my jdk version has given errors for building API level 24. But now if I try to package my game for API level 24 I get the error of package org.apache.http.client.utils does not exist. And still getting the same error as before if I try API level 21 with CodeWorks 1R5.

Have you maybe tried to package it before? Which version of CodeWorks do you use and which API level?

Log for API 21

Log for API 23-24

avatar image Tim Hobson ♦♦ STAFF Nov 02 '16 at 03:58 PM

Currently we do not support any API higher than android-22. This is being added to 4.14 and will require 1R5 and the extra step of using the SDK manager to install the platform. Currently we only install 19 and 21 by default.

If you resolve these on your end, I think that should clear up some of the issues you're seeing and the differences. I only ever package for android-19 or 21 since these are the common ones being used for GearVR and GoogleVR that I've had experience with.

avatar image aussieburger Nov 02 '16 at 04:34 PM

I'm also unable to build for android-24 with 4.14P2 and the latest included 1R5 codeworks.

See this thread for my build error: https://forums.unrealengine.com/showthread.php?124671-Which-UE4-build-is-best-for-Google-VR-amp-googlevr-branch-build-error&p=617916&viewfull=1#post617916

For daydream support we should be able to build for android-24 as per the documentation here: https://developers.google.com/vr/unreal/daydream-in-unreal#additional_project_settings or am I missing something?

avatar image MrKewer Nov 02 '16 at 05:01 PM

Thanks for your reply. This will narrow my problem a bit down. I did try packaging my game for shipping without enabling "For Distribution" and it build with no error, but if I enable it, it does not package ( just some extra info). I was trying to package my game in Windows 8.1 and I am currently re-installing Unreal Engine on a different computer which has Windows 7 on it. I will then try to package it on that computer and will let you know what happens.

avatar image aussieburger Nov 02 '16 at 05:34 PM

strange my build fails with android-24 without distribution ticked with 4.14P2, the latest codeworks in that UE4 version and windows 10. You also following the settings here: https://developers.google.com/vr/unreal/daydream-in-unreal#additional_project_settings ?

avatar image MrKewer Nov 02 '16 at 06:24 PM

Hi aussieburger, I'm just trying to package my game for GoogleVR for distribution for any API not for Daydream, sorry. I haven't used UE 4.14 but I have read on forms about previous versions that if Unreal Engine is at Preview stage its not meant to Package games or ship them because its still busy with fixing bugs etc.

But I see you want to build for development. Have you tried maybe disable all other plugins you don't use and run engine in admin mode. Or try to set the deployment mode to Daydream & Cardboard.

I see on your form you said something of a game you already created for GoogleVR did you uploaded it on the Play Store?

avatar image aussieburger Nov 02 '16 at 07:46 PM

Hey sorry I misunderstood and thought you were also building for daydream :)

I can confirm building for cardboard only with android-21 and For Distribution also fails for me in 4.14P2 (works without For Distribution).

We not released anything for cardboard yet - only GearVR (and hopefully Daydream next).

avatar image MrKewer Nov 03 '16 at 10:08 AM

Hi aussieburger. I have package an test project in Daydream I used the setting for the GoogleVR in the documentations and set the deployment mode to Daydream and I got it to build for development but not for Distribution tho. I'm using UE 13.2 and set my API level to 21 and use Android CodeWorks 1R5. I do not have an Daydream capable device to test it on so dont know if it does work or not. But it does package with these settings.

avatar image MrKewer Nov 03 '16 at 10:23 AM

Hi Tim. I have installed Unreal Engine on my windows 7 computer and tried to package a new project For Distribution and still no luck. I can package it for development and for shipping and if I disable the plugin for GoogleVR I can package my project For Distribution.

Can you please try to package a project for GoogleVR For Distribution and see if yours can package it. It would help me a lot if someone can confirm that it does package then I know there is something wrong I'm doing

avatar image RVillani Nov 12 '16 at 12:08 AM

UE 4.13.2

Same problem as you guys. Just unticking "For distribution" solved it for compiling in Shipping config. And I know the problem wasn't my keystore because I used the same settings and keystore from another project (that hasn't GoogleVR) that compiles just fine.

Now, is there a workaround to be able to publish to the playstore without signing the apk? Or a way to sign an already packaged apk?

avatar image SlipStream7800 Nov 24 '16 at 11:27 PM

Or a way to sign an already packaged apk?

A bit late, but yes there is. Or you can use jarsigner.exe if you prefer, but note that the order of the zipalign step differs in its case.

jarsigner.exe documentation:

Command line

`-sigalg` Signature Algorithms

`-digestalg` Message Digest Algorithms

avatar image RVillani Dec 07 '16 at 12:41 AM

Thanks a lot, @SlipStream7800 ! I managed to do it with apksigner.

Now, PlayStore complains that the apk is debuggable and it shouldn't be. So it seems Unreal builds the apk as debuggable even though I set the Package mode to Shipping. So I have to turn on the For Distribution option in UE and we're back to square 1. :(

I tried finding if there's a way to convert debuggable to release, but nothing turned out.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Same error, attached my log.

Also, fresh installation of 4.13.2, fresh installation of AndroidWorks, and compiling one of the included demos, with Google VR plugin, in shipping + distribution, generated a build failed.

link text

error.log (34.1 kB)
more ▼

answered Nov 09 '16 at 10:29 PM

avatar image

jined
51 4 6

avatar image MrKewer Nov 09 '16 at 11:06 PM

Thanks for also posting on the forms hope we can get an answer soon. I don't know what else to try anymore. I can even build for distribution for Gear VR but not for Google VR.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Same problem ... api-21 I have build the project with disabling the GoogleVR plugin also and it does build. Can we just type "-dontskipnonpubliclibraryclassmembers" somewhere? I tried to put it into ${sdk.dir}/tools/proguard/proguard-android.txt and proguard-project.txt but it still says :

 [proguard]          Alternatively, you may have to specify the option 
 [proguard]          '-dontskipnonpubliclibraryclassmembers'.
more ▼

answered Nov 25 '16 at 08:37 PM

avatar image

iKeepBelieving
198 6 9 20

avatar image n3d057upn1 Nov 25 '16 at 08:45 PM

Did you try to follow my video? It is very important to use SDK and NDK API android-24, then under android options set minimum API 21 and target 24. That is a solution for now. I am running my game on android 5.0 phone. Also use new engine version 4.14.

https://www.youtube.com/watch?v=kF2SkkNA4Cs

avatar image iKeepBelieving Nov 25 '16 at 10:03 PM

Yes! Seems that it works for now. Thank you. (Not with SDK and NDK API android-21) And only if you download latest ProGuard. (Default one seems to have problems with Java 8)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question