Unreal Engine: How-To Guides, Common Issues, and Solutions
Unreal Engine 5 com.google.android.play:core:1.10.0
[The Android Warning] com.google.android.play:core:1.10.0 Google Play Core (com.google.android.play:core) has added this note for SDK version 1.10.0: Update your Play Core Maven dependency to an Android 14 compatible version! Your current Play Core library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers to improve user security. As a reminder, from August 31, Google Play requires all new app releases to target Android 14. Update to the latest Play Core library version dependency to avoid app crashes: https://developer.android.com/guide/playcore#playcore-migration From October 22, 2024 00:00 (UTC) you won't be able to release new versions of your app containing this SDK version to production or open testing.
The Solution
go to "C:\Program Files\Epic Games\UE_(your engine version)\Engine\Plugins\Runtime\GooglePAD\Source\GooglePAD" search for GooglePAD_APL.xml
open the file with a text editor, make sure the file is not Read only in the file Properties settings
search for the line
implementation('com.google.android.play:core:1.10.0')
replace the above line with the following
implementation('com.google.android.play:asset-delivery:2.2.2')
implementation('com.google.android.play:asset-delivery-ktx:2.2.2')
next, search for the following lines
import com.google.android.play.core.tasks.OnCompleteListener;
import com.google.android.play.core.tasks.OnSuccessListener;
import com.google.android.play.core.tasks.RuntimeExecutionException;
import com.google.android.play.core.tasks.Task;
replace the above lines with the following
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.RuntimeExecutionException;
import com.google.android.gms.tasks.Task;
That was all, save the file, package the project, upload to Google Play, the warning should be gone.
Unreal Engine 5.4.2 SDK NDK JDK 0 Android Errors App Store
The past Android Set up of SDK NDK JDK, that worked amazing on all the other versions, is not working on Unreal Engine 5.4.2, mainly because you need an updated gradle (JAVA) and the past Android Set up only works with JAVA version 1.8.0_242
First you need to clean the system of any trace of the previous SDK NDK JDK - it is not enough to unistall them, you also need to delete the following folders:
C:\Program Files\Android
C:\Users\user.android
C:\Users\user.gradle
C:\Users\user\AppData\Local\Android
C:[Your UE project]\Build\
C:[Your UE project]\Intermediate\
C:[Your UE project]\DerivedDataCache
also, open “This PC”, right-click in the empty space inside the window, and select “Properties”, in the opened window, select “Advanced system settings” > “Environment Variables”, delete the following environment variables:
ANDROID_HOME
JAVA_HOME
NDK_ROOT
NDRROOT
Restart your PC.
Now, let's download and install the Android Studio - I have found that a good stable and working version is the Android Studio Jellyfish Patch 2
https://developer.android.com/studio/archive - Here, in the Android Studio download archives, you can find the Android Studio Jellyfish | 2023.3.1 Patch 2 June 10, 2024
Follow the installer instructions, do not check an extra box, just do the basic install - after the installation is completed - you need to set the JAVA_HOME “Environment Variables” to point to the JAVA version inside the Android Studio (inside the install folder from Android Studio is a folder ‘jbr’ - set JAVA_HOME “Environment Variables” to the folder ‘jbr’
Now open Android Studio - open the Configure dropdown and click SDK Manager, click the SDK Tools tab, check the box for Android SDK Command-line Tools latest version 13 - click Apply to download and install this component, after that, click OK to dismiss the window and close the welcome dialog.
Restart your PC.
Setting Up Android NDK - go to C:/Program Files/Epic Games/UE(your engine version)/Engine/Extras/Android/SetupAndroid.bat - next run the SetupAndroid.bat it will instal the NDK version that will work.
Inside Ureal Engine you can choose now ‘Target SDK version’ to 35
Restart your PC.
Now packaging should work. I hope the solution above works for your project without any problems, if you encounter problems, leave a comment and I will try to help you.
If you encounter [The Android Error] Play Billing Library version AIDL
Error
Your app currently uses Play Billing Library version AIDL and must update to at least version 5.2.1 to make use of the latest monetization features on Google Play.
Solution
Make sure your AndroidManifest.xml contains an entry with name com.google.android.play.billingclient.version
The AndroidManifest.xml file is usually located in C:\Users\(your username)\Documents\Unreal Projects\(your project)\Intermediate\Android
Billing dependencies would be found only in APKs that require the com.android.vending.BILLING permission
Solution 2 if you have multiple ...Manifest.xml files in the Intermediate\Android folder
Go to "C:\Program Files\Epic Games\UE_5.4\Engine\Build\Android\Java\gradle\app\build.gradle"
Open the build.gradle file with a text editor (before making changes to it make sure the file is not Read only, if it is, open the file Properties, uncheck the tick box and apply)
Add the following line of code in the dependencies section
def billing_version = "7.0.0"
implementation "com.android.billingclient:billing:$billing_version"
or
def billing_version = "7.0.0"
implementation "com.android.billingclient:billing:7.0.0"
Billing dependencies would be found only in APKs that require the com.android.vending.BILLING permission
also, go to
C:\Program Files\Epic Games\UE_5.4\Engine\Plugins\Online\Android\OnlineSubsystemGooglePlay\Source - search for the file OnlineSubsystemGooglePlay_UPL.xml
search for the following piece of code and change the 6.0.0 to 7.0.0 - before making changes to it make sure the file is not Read only, if it is, open the file Properties, uncheck the tick box and apply
dependencies {
implementation 'com.android.billingclient:billing:7.0.0'
}
Below are some common errors for a broken Android Set up of SDK NDK JDK
ERROR: cmd.exe failed with args /c “C:\-\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug.
ERROR: Android toolchain NDK r25c not supported; please use NDK r21 to NDK r23 (NDK r21b recommended)
Error: cmd.exe failed with args /c “C:\-\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
PackagingResults: Error: Exception org.codehaus.groovy.GroovyBugError [in thread “Daemon worker”]
PackagingResults: Error: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
UATHelper: Packaging : Could not initialize class org.codehaus.groovy.reflection.ReflectionCache UATHelper: Packaging : Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread “Daemon worker”]
Upgrade Google Play Services Ads from 18.1.0 to 22.6.0 Android Error
[The Android Warning] com.google.android.gms:play-services-ads-lite:18.1.0
Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads-lite) has reported version 18.1.0 as outdated.
From September 16, 2024 00:00 (UTC) you won't be able to release versions of your app containing this SDK version to production or open testing. Update to a newer version (20.0.0+).
[The Android Warning] Update your target API level by August 31, 2024 to release updates to your app
From August 31, 2024, if your target API level is not within 1 year of the latest Android release, you won't be able to update your app.
[The Android Warning] Action required: Migrate to supported version of Google Play Billing Library
By Aug 31, 2024, all new apps and updates to existing apps must use Billing Library version 6 or newer. If you need more time to update your app, you will be able to request an extension until Nov 1, 2024.
Unreal Engine 5 Update Google Play Billing Library 3, 4 or 5 to 6
Error [ANDROID] We’ve detected that this app is using an old version of Google Play Billing. Please upgrade to Billing Library version 6 or newer to publish this app.
Error [ANDROID] We’ve detected that one or more of the app bundles included in this release are using the following Play Billing Library versions
5.0.0
These are unsupported versions of Google Play Billing. Upgrade to a supported version to publish this app.
The solution I find, that works, is really simple, go to
C:\Program Files\Epic Games\UE(your engine version)\Engine\Plugins\Online\Android\OnlineSubsystemGooglePlay\Source - search for the file OnlineSubsystemGooglePlay_UPL.xml
search for the following piece of code and change the 3.0.0 or 4.0.0 or 5.0.0 to 6.0.0 - before making changes to it make sure the file is not Read only, if it is, open the file Properties, uncheck the tick box and apply
dependencies {
implementation 'com.android.billingclient:billing:6.0.0'
}
According to Google Play every new app update after November 1, 2024 must use Google Play Billing Library version 6 - I hope the solution above works for your project without any problems, if you encounter problems, leave a comment and I will try to help you. Have a nice day!
Unreal Engine 5 on Android - Permission Required, Storage, Error Screen
The game does not start, instead you see the Permission Required, Storage, Error Screen
Error [ANDROID] Title: Permission Required - Text: You must approve this permission in App Settings: Storage - Buttons: Seetings, Quit.
The problem targets Android 13 API 33 and above
Solution that did worked for me (not amazing, but at least it works)
Go to Project Settings > Android > APK Packaging search for "UseExternalFilesDir for UnrealGame files?" set it to True (check the box)
Next go to Project Settings > Android > Launch Images search for "Show launch image" set it to False (uncheck the box)
Is not the most amazing solution, because from this point on the application will not show a start image, but at least the users will be able to open the application.
Solution that is not for Android 13 API 33, but has worked well in the past (you can implement also this step)
Go to Project Settings > Android > Advanced APK Packaging search for Extra Permissions add 4 extra as following
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_EXTERNAL_STORAGE
android.permission.WRITE_INTERNAL_STORAGE
android.permission.READ_INTERNAL_STORAGE
Untested solution to this problem (it may work) - change the AndroidManifest.xml file
C:\Users\(your username)\Documents\Unreal Projects\(your project)\Intermediate\Android search for AndroidManifest.xml file and change
From:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
To:
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
This means when this app is installed on an Android device with an API higher than 18 (you could also choose other versions) the WRITE_EXTERNAL_STORAGE permission will be ignored as if it wasn’t even in the AndroidManifest.xml file.
Solution that didn't worked for me, but worked for some devs
Go to
C:\Users\(your username)\Documents\Unreal Projects\(your project)\Build\Android
create a .txt file - call it ManifestRequirementsOverride.txt
add the following text
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="33" />
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_EXTERNAL_STORAGE
Unreal Engine - How To Generate Key Store for .apk (Sign Projects for Release)
Before you can submit or even upload your project to the Google Play Store, you will need to generate a Keystore.
Important To Remember In The Future! You need an unique store key for every app you make and want to distribute through Google Play Store, after you have uploaded your application to the store you need the same Keystore every time you update your app, therefore, keep the Keystore safe in your project folder, and never delete it, also save and store somewhere safe important details like the Keystore password.
Important! Before you upload to the store, you will need an unique package name for your project.
go to Edit > Project Settings > Platforms > Android > APK Packaging > Android Package Name > com.Company.Project replace the Company and Project with some unique names that have a meaning for you, the Company can be your name and the Project can be the name you want to give to your app.
go to Edit > Project Settings > Platforms > Android > Distribution Signing > complete the Key Store, Key Alias and the Key Store Password.
The Key Store should look like store.name this is the name of the file you will later add to your project, before, packaging the application for distribution, replace the name with a name that you want to give to the key store file, but keep the store part in front something like store.examplenameThe Key Alias can be examplename without the store. in front, and the Key Store Password, I recommend it to be something easy to remember, for instance examplenamepass
Generate A Keystore - a Tutorial for Windows operating systems
Find the address for the bin folder of the jdk install found in Android Studio (this folder was created when you have installed Android Studio application), after you have found the address, start the cmd (Command Prompt), paste the address in cmd (CTRL + V to paste) with cd in front of it, for me is something like this > cd C:\Program Files\Android\Android Studio\jre\bin
Paste the follwing line:
keytool -genkey -v -keystore store.examplename -alias examplename -storepass examplenamepass -validity 9999
Next, you will be asked some questions, answer them as following:
for the first 3 questions you can type your First and Last name
then, type the name of your City or Locality, the State or Province and the Country code.
You will be asked to verify, type yes, and press Enter, you will be asked to type the password for the Key Alias, instead of typing something you can press two times Enter or you can type a new extra password, press Enter, the key store file should be created, you can find it in the bin folder.
Copy and Paste the file into your Unreal Engine project folder: Documents\Unreal Projects\YourProject\Build\Android.
How to obtain the Signing certificate fingerprint (SHA1)
With the key store file created, open the cmd and type > cd C:\Program Files\Android\Android Studio\jre\bin , then, insert:
keytool -exportcert -alias examplename -keystore store.examplename -storepass examplenamepass -list -v
Now, the Signing certificate fingerprint (SHA1) should be seen in the cmd window.
That was all. If you have questions or you need additional help, contact me by posting a comment in the comment section below or through the contact page. Have a nice day!
Unreal Engine Android App Bundle (Different Type of Key Store) To Upload .aab on Google Play Store
To Upload .aab on Google Play Store you need a Different Type of Key Store than for an .apk upload
go to Edit > Project Settings > Platforms > Android > Distribution Signing > complete the Key Store, Key Alias and the Key Store Password.
The Key Store should look like store.name this is the name of the file you will later add to your project, before, packaging the application for distribution, replace the name with a name that you want to give to the key store file, but keep the store part in front something like store.examplenameThe Key Alias can be examplename without the store. in front, and the Key Store Password, I recommend it to be something easy to remember, for instance examplenamepass
Unreal Engine Android App Bundle - Generate Keystore (Tutorial for Windows operating systems)
Find the address for the bin folder of the jdk install found in Android Studio (this folder was created when you have installed Android Studio application), after you have found the address, start the cmd (Command Prompt), paste the address in cmd (CTRL + V to paste) with cd in front of it, for me is something like this > cd C:\Program Files\Android\Android Studio\jre\bin
Paste the follwing line:
keytool -genkey -v -keystore examplename.jks -keyalg RSA -keysize 2048 -validity 10000 -alias examplenamealias
(replace the examplename with the information you want)
Next, you will be asked some questions, answer them as following:
for the first 3 questions you can type your First and Last name
then, type the name of your City or Locality, the State or Province and the Country code.
You will be asked to verify, type yes, and press Enter, you will be asked to type the password for the Key Alias, instead of typing something you can press two times Enter or you can type a new extra password, press Enter, the key store file should be created, you can find it in the bin folder.
Copy and Paste the file into your Unreal Engine project folder: Documents\Unreal Projects\YourProject\Build\Android.
Upload .aab on Google Play Store - Keystore Troubleshooting
with the examplename.jks in the bin folder
open cmd and type > cd C:\Program Files\Android\Android Studio\jre\bin (or the path to the folder you have installed Android Studio)
Paste the follwing line:
keytool -export -rfc -keystore examplename.jks -alias examplenamealias -file examplename_certificate.pem
Now, go to Google Play Console, select Choose Signing key > Use a different key > Export and upload a key from Java keystore - upload the newly created Key, in the section: Upload your upload key certificate
Next, from > Export and upload a key from Java keystore - Download encryption public key and Download PEPK tool
You need to install JAVA version 11 or newer (if you already have a older JAVA and you do not want to uninstall it, I recommend to use an open JAVA like AdoptOpenJDK)
Paste the encryption public key and PEPK tool in the bin folder of JAVA 11
Next, you will need to create a second key
open cmd > cd C:\Program Files\Android\Android Studio\jre\bin
keytool -genkey -v -keystore examplename2.jks -keyalg RSA -keysize 2048 -validity 10000 -alias examplenamealias2
Copy and Paste the file in the folder where you have the encryption public key and PEPK tool
java -jar pepk.jar --keystore=examplename2.jks --alias=examplenamealias2 --output=examplename2.zip --include-cert --rsa-aes-encryption --encryption-key-path="C:\Program Files\your path to jdk(JAVA 11 folder)\bin\encryption_public_key.pem"
Upload the newly created examplename2.zip to Google Play Console > App signing preferences > Export and upload a key from Java keystore > Upload generated ZIP
That was all. If you have questions or you need additional help, contact me by posting a comment in the comment section below or through the contact page. Have a nice day!
Unreal Engine Migrate a Project to a New Engine Version
Migrating a project from one version of Unreal Engine to another involves several steps to ensure compatibility and to take advantage of new features and improvements in the updated engine version.
Before starting the migration process, create a backup of your project. This ensures you can revert to the previous version if something goes wrong.
I personally don't use the default migration feature provided by Unreal Engine, the Convert in Place or Make a Copy feature, because, every time I used the feature a number of compatibility issues arise.
When I want to migrate a project, I copy and paste the content from the old project to the new project (I recommend the new project to be blank, this way, you will avoid a lot of troubles that can arise)
Next, open the Project Settings of the old project and Export the settings to your device
Open the Project Settings of the new project and Import the settings
This process has worked for me many times with little or no problems at all. My personal opinion is that this is the best solution to project migration in Unreal Engine
Even if Convert in Place or Make a Copy feature works well, almost certainly you will find problems when you will try to package the project (and that can be extremely frustrating).
That was all. If you have questions or you need additional help, contact me by posting a comment in the comment section below or through the contact page. Have a nice day!
Unreal Engine 5 XAPK File Validation Failed
If you try to open your app and you encounter XAPK File Validation Failed Error that mean's that your project was not packaged correctly, the only solution to this problem is to package and upload a new version of your app.
First you need to clean the system of any trace of the previous package, before we start make a copy of your project, after that - go to - C:\Users\(your user name)\Documents\Unreal Projects\(your project)\ and delete de following folders: Saved, Intermediate, DerivedDataCache
Now, open your project in editor mode and go to Project Settings > Android > App Bundles make sure you have all the 5 boxes checked.
Next, go to Project Settings > GooglePAD and check the first 2 boxes.
In the Project Settings > Packaging > Project make sure you have the Build Configuration set to Shipping and the boxes Full Rebuild and For Distribution are checked.
Package Project and upload to the Google Play Console, the error should be gone.
That was all, this solution works also for the error > uproject file not found.
Unreal Engine 5 Package Project Android Set up SDK NDK JDK 2024 update
!!!The following set up is not working on Unreal Engine 5.4.2, mainly because you need an updated gradle (JAVA) and the past Android Set up only works with JAVA version 1.8.0_242 - I have found a stable and working Unreal Engine 5.4.2 SDK NDK JDK set up - click the link to read the full article
If you are here, that means the "Setting Up Android SDK and NDK for Unreal" official page didn't work for you, the page is clearlly outdated - also, other guides or forum solutions didn't work either - then please be patient and follow the following instructions as written below
If you encounter problems with your set up that means you have some versions of SDK NDK JDK in your system - for the guide to work you need a clean system without any trace (I'm not joking) of the previous SDK NDK JDK - it is not enough to unistall them, you also need to delete the following folders:
C:\Program Files\Android
C:\Users\user.android
C:\Users\user.gradle
C:\Users\user\AppData\Local\Android
C:[Your UE project]\Build\
C:[Your UE project]\Intermediate\
C:[Your UE project]\DerivedDataCache
also, open “This PC”, right-click in the empty space inside the window, and select “Properties”, in the opened window, select “Advanced system settings” > “Environment Variables”, delete the following environment variables:
ANDROID_HOME
JAVA_HOME
NDK_ROOT
NDRROOT
Restart your PC.
To Solve and Fix multiple packaging errors, you need to understand that the Android Studio 4.0 from May 28, 2020 - is the ONLY version that will work, it doesn't matter what others have said - this is a huge problem because people can not belive that ONLY a specific version will work and all the other versions will give errors when packaging - this is the truth for all UE versions between 4.27 to 5.4 - also do not download or install other NDK and JDK - Android Studio 4.0 from May 28, 2020 will provide the ONLY functional NDK and JDK versions for Unreal Engine
https://developer.android.com/studio/archive - Here, in the Android Studio download archives, you can find the Android Studio 4.0 from May 28, 2020
Now, let's start - install the Android Studio 4.0 from May 28, 2020 - follow the installer instructions, do not check an extra box, just do the basic install - after the installation is completed - you need to set the JAVA_HOME “Environment Variables” to point to the JAVA version inside the Android Studio 4.0 (inside the install folder from Android Studio 4.0 is a folder ‘jre’, with JAVA version 1.8.0_242 , that’s the ONLY version that works) - set JAVA_HOME “Environment Variables” to the folder ‘jre’
Now open Android Studio 4.0 - open the Configure dropdown and click SDK Manager, click the SDK Tools tab, check the box for Android SDK Command-line Tools version 8.0 (this is the only version that works, do not install other versions). Click Apply to download and install this component, after that, click OK to dismiss the window and close the welcome dialog.
Restart your PC.
Setting Up Android NDK - go to C:/Program Files/Epic Games/UE(your engine version)/Engine/Extras/Android/SetupAndroid.bat - open the SetupAndroid.bat with a text program like Notepad make sure that in the file the text says "cmdline-tools\8.0" - if the text says "cmdline-tools\latest" replace it with "cmdline-tools\8.0" - before making changes to it make sure the file is not Read only, if it is, open the file Properties, uncheck the tick box and apply - next run the SetupAndroid.bat it will instal the ONLY NDK version that will work.
Now, open the cmd and run ‘C:\Users\YourUserName\AppData\Local\Android\SDK\tools\bin\sdkmanager.bat --licenses’ Type Y and press Enter to accept.
Inside Ureal Engine chose ‘Target SDK version’ to 30 (won’t work with any version below 30)
Restart your PC.
Now packaging should work. I hope the solution above works for your project without any problems, if you encounter problems, leave a comment and I will try to help you.
Below are some common errors for a broken Android Set up of SDK NDK JDK
ERROR: cmd.exe failed with args /c “C:\-\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug.
ERROR: Android toolchain NDK r25c not supported; please use NDK r21 to NDK r23 (NDK r21b recommended)
Error: cmd.exe failed with args /c “C:\-\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
PackagingResults: Error: Exception org.codehaus.groovy.GroovyBugError [in thread “Daemon worker”]
PackagingResults: Error: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
UATHelper: Packaging : Could not initialize class org.codehaus.groovy.reflection.ReflectionCache UATHelper: Packaging : Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 [in thread “Daemon worker”]
Explore essential Unreal Engine how-to guides, troubleshoot common issues, and find practical solutions to optimize your game development workflow.
Comments
Post a Comment