I keep getting an error when exporting to android on 4.27.2 "cmd.exe failed with args /c"

Here is the log files below “preparing native code”

UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ====7.7.2024 21.43.52====PREPARING NATIVE CODE=====-armv7============================================================
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): bPackageDataInsideApk = True
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Obb location D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27/Saved/StagedBuilds/Android_Multi.obb
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Obb destination location D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Intermediate\Android\armv7/assets
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Obb file exists…
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copying D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27/Saved/StagedBuilds/Android_Multi.obb to D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Intermediate\Android\armv7/assets\main.obb.png
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): UE4CommandLine.txt exists…
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Added repository: C:\NVPACK\android-sdk-windows\extras\google\m2repository
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Added repository: C:\NVPACK\android-sdk-windows\extras\android\m2repository
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Added repository: D:\Games\UE_4.27\Engine\Source\ThirdParty\Android\extras\google\m2repository
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Added repository: D:\Games\UE_4.27\Engine\Source\ThirdParty\Android\extras\android\m2repository
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AARImports: com.google.android.gms, play-services-auth, 11.8.0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AARImports: com.google.android.gms, play-services-games, 11.8.0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AARImports: com.google.android.gms, play-services-nearby, 11.8.0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AARImports: com.google.android.gms, play-services-plus, 11.8.0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): WARNING:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): WARNING: GooglePlay Games App ID is invalid! Replacing it with “1”
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copying Google Play BillingApiV2 java files
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Directory Engine/Plugins/Online/Android/OnlineSubsystemGooglePlay/Source/Java/BillingApiV2 copied to D:/Games/Ragdoll Fun 4/Project/RagdollFun_4Mobile 4.27/Intermediate/Android/armv7/src
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copying permission_library directory to staging before build
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Directory D:/Games/UE_4.27/Engine/Source/ThirdParty/AndroidPermission/permission_library copied to D:/Games/Ragdoll Fun 4/Project/RagdollFun_4Mobile 4.27/Intermediate/Android/armv7/JavaLibs/permission_library
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Writing to OBB data file D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Intermediate\Android\armv7\src\com\RagdollDude\RagdollFun4M\OBBData.java ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== OBB data file up to date so not writing. ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copying new .so D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Binaries\Android\RagdollFun_4-Android-Shipping-armv7.so file to jni folder…
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copying libplaycore.so and proguard files
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): File D:/Games/UE_4.27/Engine/Plugins/Runtime/GooglePAD/Source/GooglePAD/…/ThirdParty/play-core-native-sdk/libs/armeabi-v7a/ndk21.4.7075529/c++_shared/libplaycore.so copied to D:/Games/Ragdoll Fun 4/Project/RagdollFun_4Mobile 4.27/Intermediate/Android/armv7/libs/armeabi-v7a/libplaycore.so
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copying libvrapi.so
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): File D:/Games/UE_4.27/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/armeabi-v7a/libvrapi.so copied to D:/Games/Ragdoll Fun 4/Project/RagdollFun_4Mobile 4.27/Intermediate/Android/armv7/libs/armeabi-v7a/libvrapi.so
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copying libOVRPlugin.so
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): File D:/Games/UE_4.27/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/Lib/armeabi-v7a/libOVRPlugin.so copied to D:/Games/Ragdoll Fun 4/Project/RagdollFun_4Mobile 4.27/Intermediate/Android/armv7/libs/armeabi-v7a/libOVRPlugin.so
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): File D:/Games/UE_4.27/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/VrApi.jar copied to D:/Games/Ragdoll Fun 4/Project/RagdollFun_4Mobile 4.27/Intermediate/Android/armv7/libs/VrApi.jar
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): File D:/Games/UE_4.27/Engine/Source/ThirdParty/Oculus/OVRPlugin/OVRPlugin/ExtLibs/SystemUtils.jar copied to D:/Games/Ragdoll Fun 4/Project/RagdollFun_4Mobile 4.27/Intermediate/Android/armv7/libs/SystemUtils.jar
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ====7.7.2024 21.44.16====PERFORMING FINAL APK PACKAGE OPERATION=====-armv7===========================================
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copied file D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Intermediate\Android\armv7\gradle\app\src\main\jniLibs\armeabi-v7a\libc++_shared.so.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copied file D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Intermediate\Android\armv7\gradle\app\src\main\jniLibs\armeabi-v7a\libUE4.so.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Copied file D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Intermediate\Android\armv7\gradle\app\src\main\assets\main.obb.png.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Making .apk with Gradle…
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Downloading https://services.gradle.org/distributions/gradle-6.1.1-all.zip
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Exception in thread “main” javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2662)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2584)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1770)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.Download.downloadInternal(Download.java:66)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.Download.download(Download.java:51)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.Install$1.call(Install.java:62)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.Install$1.call(Install.java:48)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.Install.createDist(Install.java:48)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.validator.Validator.validate(Validator.java:260)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): … 22 more
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): … 28 more
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ERROR: cmd.exe failed with args /c “D:\Games\Ragdoll Fun 4\Project\RagdollFun_4Mobile 4.27\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): (see C:\Users\Julius\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Games+UE_4.27\Log.txt for full exception trace)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): BUILD FAILED
PackagingResults: Error: Unknown Error

Im guessing its because of the " sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ", but i have no idea how to fix it. Any help would be greatly appreciated.

Greetings @zl0ys1

Welcome back to the Unreal Forums! I spent some time looking into this issue that you’ve ran into as I’ve saw it once before a while back. I tried to find an official link to people discussing it. But, the only thing I could come across was some unofficial posts about. I did pull a link with someone talking about the specifics of how to resolve it and what the problem actually is. However, this is not a post from me or anyone at Epic. So, proceed at your own risk. But, it’s probably worth a look as they seem to be providing direct info and solutions to fixing the problem. Here is the link to the info that I pulled on it. I hope that this is helpful!

Hello @FrostyJas

I don’t know how to install that. I dont have any experience with java. I just make games with the unreal engine blueprints, so i dont understand any of that.

I ended up fixing it by just downloading unreal engine on my other system, and packaging there.

I see! Well, I’m glad that you did find a solution even though you had to use the other PC. I’ve been there. (Also, yea Java can be touchy if you’re not familiar with it)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.