Download

Android Packaging isn't working because of Gradle

[SPOILER]UATHelper: Packaging (Android (ETC2)): ====04.01.2018 18:47:07====PREPARING TO MAKE APK=================================================================
UATHelper: Packaging (Android (ETC2)): Building Java with SDK API level ‘android-24’
UATHelper: Packaging (Android (ETC2)): Building with Build Tools version ‘25.0.3’
UATHelper: Packaging (Android (ETC2)): Using package name: ‘com.YourCompany.Uebung’
UATHelper: Packaging (Android (ETC2)): ==== Writing to OBB data file F:\Projekte\Uebung - Kopie\Build\Android\src\com\YourCompany\Uebung\OBBData.java ====
UATHelper: Packaging (Android (ETC2)): ==== Writing to shim file F:\Projekte\Uebung - Kopie\Build\Android\src\com\epicgames\ue4\DownloadShim.java ====
UATHelper: Packaging (Android (ETC2)): ==== Shim data file up to date so not writing. ====
UATHelper: Packaging (Android (ETC2)): ==== Writing to template target file F:\Projekte\Uebung - Kopie\Build\Android\src\com\YourCompany\Uebung\AlarmReceiver.java ====
UATHelper: Packaging (Android (ETC2)): ==== Template target file up to date so not writing. ====
UATHelper: Packaging (Android (ETC2)): ==== Writing to template target file F:\Projekte\Uebung - Kopie\Build\Android\src\com\YourCompany\Uebung\DownloaderActivity.java ====
UATHelper: Packaging (Android (ETC2)): ==== Template target file up to date so not writing. ====
UATHelper: Packaging (Android (ETC2)): ==== Writing to template target file F:\Projekte\Uebung - Kopie\Build\Android\src\com\YourCompany\Uebung\OBBDownloaderService.java ====
UATHelper: Packaging (Android (ETC2)): ==== Template target file up to date so not writing. ====
UATHelper: Packaging (Android (ETC2)): Cleaning up files based on template dir F:\Projekte\Uebung - Kopie\Build\Android\src\com\YourCompany\Uebung
UATHelper: Packaging (Android (ETC2)): Previous .apk file(s) were made with different build settings, forcing repackage.
UATHelper: Packaging (Android (ETC2)): UPL Init: armeabi-v7a
UATHelper: Packaging (Android (ETC2)): Android Permission Plugin Init
UATHelper: Packaging (Android (ETC2)): Google Cloud Messaging init
UATHelper: Packaging (Android (ETC2)): GCMClientSenderID set: false
UATHelper: Packaging (Android (ETC2)): GearVR init
UATHelper: Packaging (Android (ETC2)): Oculus Signature Files (osig) will be removed from APK
UATHelper: Packaging (Android (ETC2)): Android Voice init
UATHelper: Packaging (Android (ETC2)): On build machine.
UATHelper: Packaging (Android (ETC2)): Fixing minSdkVersion; requires minSdkVersion of 14 with Gradle based on active plugins
UATHelper: Packaging (Android (ETC2)): Performing complete package - wiping F:\Projekte\Uebung - Kopie\Intermediate/Android/APK, except for predexedLibs
UATHelper: Packaging (Android (ETC2)): bPackageDataInsideApk = False
UATHelper: Packaging (Android (ETC2)): Added repository: C:\NVPACK\android-sdk-windows\extras\android\m2repository
UATHelper: Packaging (Android (ETC2)): Added repository: C:\Program Files\Epic Games\UE_4.18\Engine\Source\ThirdParty\Android\extras\google\m2repository
UATHelper: Packaging (Android (ETC2)): Added repository: C:\Program Files\Epic Games\UE_4.18\Engine\Source\ThirdParty\Android\extras\android\m2repository
UATHelper: Packaging (Android (ETC2)): AARImports: com.google.android.gms, play-services-auth, 11.0.4
UATHelper: Packaging (Android (ETC2)): AARImports: com.google.android.gms, play-services-games, 11.0.4
UATHelper: Packaging (Android (ETC2)): AARImports: com.google.android.gms, play-services-nearby, 11.0.4
UATHelper: Packaging (Android (ETC2)): AARImports: com.google.android.gms, play-services-plus, 11.0.4
UATHelper: Packaging (Android (ETC2)): AARImports: com.android.support, support-v13, 25.2.0
UATHelper: Packaging (Android (ETC2)): ====04.01.2018 18:47:08====PREPARING NATIVE CODE=================================================================
UATHelper: Packaging (Android (ETC2)): On build machine.
UATHelper: Packaging (Android (ETC2)): Fixing minSdkVersion; requires minSdkVersion of 14 with Gradle based on active plugins
UATHelper: Packaging (Android (ETC2)): Copying permission_library directory to staging before build
UATHelper: Packaging (Android (ETC2)): Directory C:\Program Files\Epic Games\UE_4.18/Engine/Source/ThirdParty/AndroidPermission/permission_library copied to F:\Projekte\Uebung - Kopie\Intermediate/Android/APK/JavaLibs/permission_library
UATHelper: Packaging (Android (ETC2)): ==== Writing new GameActivity.java file to F:\Projekte\Uebung - Kopie\Intermediate/Android/APK\src\com\epicgames\ue4\GameActivity.java ====
UATHelper: Packaging (Android (ETC2)): Copying new .so F:\Projekte\Uebung - Kopie\Binaries\Android\Uebung-armv7-es2.so file to jni folder…
UATHelper: Packaging (Android (ETC2)): Preparing native code for debugging…
UATHelper: Packaging (Android (ETC2)): File C:\Program Files\Epic Games\UE_4.18/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/libvrapi.so copied to F:\Projekte\Uebung - Kopie\Intermediate/Android/APK/libs/armeabi-v7a/libvrapi.so
UATHelper: Packaging (Android (ETC2)): Copying libOVRPlugin.so
UATHelper: Packaging (Android (ETC2)): File C:\Program Files\Epic Games\UE_4.18/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/Lib/armeabi-v7a/libOVRPlugin.so copied to F:\Projekte\Uebung - Kopie\Intermediate/Android/APK/libs/armeabi-v7a/libOVRPlugin.so
UATHelper: Packaging (Android (ETC2)): File C:\Program Files\Epic Games\UE_4.18/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/VrApi.jar copied to F:\Projekte\Uebung - Kopie\Intermediate/Android/APK/libs/VrApi.jar
UATHelper: Packaging (Android (ETC2)): File C:\Program Files\Epic Games\UE_4.18/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/SystemUtils.jar copied to F:\Projekte\Uebung - Kopie\Intermediate/Android/APK/libs/SystemUtils.jar
UATHelper: Packaging (Android (ETC2)): ====04.01.2018 18:47:13====PERFORMING FINAL APK PACKAGE OPERATION================================================
UATHelper: Packaging (Android (ETC2)): Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
UATHelper: Packaging (Android (ETC2)): Making .apk with Gradle…
UATHelper: Packaging (Android (ETC2)): Observed package id ‘build-tools;25.0.3’ in inconsistent location ‘C:\NVPACK\android-sdk-windows\build-tools\android-7.1.1’ (Expected ‘C:\NVPACK\android-sdk-windows\build-tools\25.0.3’)
UATHelper: Packaging (Android (ETC2)): Observed package id ‘build-tools;25.0.3’ in inconsistent location ‘C:\NVPACK\android-sdk-windows\build-tools\android-7.1.1’ (Expected ‘C:\NVPACK\android-sdk-windows\build-tools\25.0.3’)
UATHelper: Packaging (Android (ETC2)): Incremental java compilation is an incubating feature.
UATHelper: Packaging (Android (ETC2)): Observed package id ‘build-tools;25.0.3’ in inconsistent location ‘C:\NVPACK\android-sdk-windows\build-tools\android-7.1.1’ (Expected ‘C:\NVPACK\android-sdk-windows\build-tools\25.0.3’)
UATHelper: Packaging (Android (ETC2)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ETC2)): * What went wrong:
UATHelper: Packaging (Android (ETC2)): A problem occurred configuring project ‘:app’.
UATHelper: Packaging (Android (ETC2)): > Could not resolve all dependencies for configuration ‘:app:_debugApk’.
UATHelper: Packaging (Android (ETC2)): > A problem occurred configuring project ‘:permission_library’.
UATHelper: Packaging (Android (ETC2)): > You have not accepted the license agreements of the following SDK components:
UATHelper: Packaging (Android (ETC2)): [Android Support Repository].
UATHelper: Packaging (Android (ETC2)): Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
UATHelper: Packaging (Android (ETC2)): Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
UATHelper: Packaging (Android (ETC2)): * Try:
UATHelper: Packaging (Android (ETC2)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
UATHelper: Packaging (Android (ETC2)): BUILD FAILED
UATHelper: Packaging (Android (ETC2)): Total time: 27.648 secs
UATHelper: Packaging (Android (ETC2)): ERROR: cmd.exe failed with args /c “F:\Projekte\Uebung - Kopie\Intermediate/Android/APK\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ETC2)): (see C:\Users\Christian\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.18\UAT_Log.txt for full exception trace)
UATHelper: Packaging (Android (ETC2)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults: Error: Unknown Error
LogSlate: Only BGRA pngs, bmps or icos are supported in by External Image Picker
LogTemp: Executing iPhonePackager certificates Engine -bundlename com.YourCompany.Uebung
LogTemp: CWD: C:\Program Files\Epic Games\UE_4.18\Engine\Binaries\DotNET\IOS
LogTemp: Initial Dir: C:\Program Files\Epic Games\UE_4.18
LogTemp: Env CWD: C:\Program Files\Epic Games\UE_4.18\Engine\Binaries\DotNET\IOS
LogTemp: BranchPath = DESKTOP-QT7J0MQ/C/Program Files/Epic Games/UE_4.18/Engine/Binaries — GameBranchPath = DESKTOP-QT7J0MQ/C/Program Files/Epic Games/UE_4.18/Engine/Binaries
LogTemp: IPP ERROR: Could not find provision directory ‘C:\Users\Christian\AppData\Local/Apple Computer/MobileDevice/Provisioning Profiles/’.[/SPOILER]

I don’t know why it isn’t working. With Apache Ant it also doesn’t package.

Go to Project Settings -> Android -> and click on button “Accept SDK License”.

I have accepted it already.

Try deleting the Saved and Intermediate folders in your project and then building your project again and see if it builds.

It isn’t working anyway. It shows the same error when I try to build a new project.

Go to NVPACK/android-sdk-windows/licences, delete android-sdk-license and Accept SDK License in UE4 again.

Everyone is wrong here; the module has updated. I had the same problem. While you install SDK there is one updated module you have to unselect all first and only select Updated module and update it, then Gradle is going to work, nothing else will help, I surprised Epic Developers are not aware of such an issue.

Gradle will always fail either build or run if you do not update the internal module. This setting is outside the UE4 and you have to find it somewhere in NVPACK installed.

I have that wrong here too!!!
UE4.18 , I can’t build apk now…

update the SDK in NVPack folder, deselect all and select only updated module and hit Next, it will update it, EPic doesn’t aware of this issue and just suggesting either turn off Gradle or follow the instruction where some steps are not correct, for instance, they have forgotten entirely about modules and updates, if you don’t update it you can’t compile.

How to update the modules through codeworks window?

Run it C:\NVPACK\Chooser.exe and follow my instruction above.

Is this anything to do with the reason you can’t see ‘1R6u1’ in the installer, only ‘1R6’? I’ve tried to install codeworks on 2 machines and it’s the same.

Any help would be great!

Because you need to download it from the internet.

@Dannington @smbv1 I’m encountering the same error where I can’t see 1R6u1 in the installer, just 1R6. Were you able to get this working? I’m on 4.18. And smbv1, mind clarifying what you mean by download it from the internet? What am I trying to download? Is it possible to correct through just the provided installer? Thanks!

I will help you once Unreal Engone documentation will be back online
https://docs.unrealengine.com/Default.aspx?tabid=12151&error=An%20unexpected%20error%20has%20occurred

If internet is not available you have to setup proxy.
https://docs.nvidia.com/gameworks/content/developertools/mobile/androidworks/androidworks_welcome.htm

With Gradle you need to have the Android Support Repository and Android Support Library

I was having problems with packaging too, but I realized that I was missing a repository. After having a look at the logs your issue seems the same.

This solved my issue with failed packaging - >

Go to - NVPACK\android-sdk-windows ools\android.bat

Downloaded/Update Android Support Repository and Android Support Library

It should be at the bottom

Package again and it will work. Assuming everything else is set up properly.

It works but, only if you have got your files installed from codeworks first. Thank you to Paul Eckhardt on “the question authority”.site.

Im unable to locate NVPACK\android-sdk-windows ools\android.bat ?