[UE 5.4] Building for Android, errors and compatibility

Hello dear mobile developers,

Unreal 5.4 was released few days ago, so I decided to try to port my Unreal projects on this version.

As you know, developing for mobile is a nightmare given the little attention Epic pays to mobile.

5.3 was totally unusable because of the new IAP system (+ the fact they used deprecated Ads libraries).

So I wanted to try this new version to see if they had fix it.


But for now, I can’t even build on this version (blank project and ported project).

I have this error:

Could not resolve com.android.tools.build:gradle:7.4.2.

I’ve tried dozens of configurations of java, SDK, build-tools… every time I have this “gradle 7.4.2” error… which is not even the version I’m using.

And of course, the engine is still not compatible with many java versions:

LogPlayLevel: Error: UAT: X:\app\src\main\java\com\epicgames\unreal\GameActivity.java:1020: error: cannot find symbol


Have you found any working configuration ? :smiley:

Thanks!

Well, the configuration was good (SDK 33, NDK 25, JAVA 17).

The problem is the admob system.

In Unreal 5.2, you were required to add dependencies inside “target.cs” and “build.cs”.

Doing this in 5.4 just causes Java errors.


New question: does anyone know what to do instead? :stuck_out_tongue:

Also, did someone managed to make the “Start an in-app purchase” works? :eyes:

I’m developing a mobile game and started off using Unreal version 5.3. Everything was going smoothly until I reached the part involving in-app purchases (IAP). After encountering comments indicating that the IAP process was broken, I decided to take a step back and start by querying the Play Store for the IAP items. Once I finished the configuration, I successfully retrieved the IAP items from the store. The next step was to perform the actual purchase, but at this point, I encountered a major hurdle. Every time I tried to use the “Start an In-app Purchase” node, the app crashed with a Java error related to not finding a string class. People suggested recompiling Unreal with some changes to avoid this issue. However, I thought, “Why not try version 5.4?” I migrated from 5.3 and was forced to disable almost all the plugins. After that, I was able to perform the IAP purchase without any issues.

A few tips:

  • To ensure the IAP works, you must sign the app in shipping mode and create an internal testing setup in the Play Console.
  • Use Play Services for achievements, even if you aren’t using achievements.
  • Follow the official Android documentation to set up all the necessary Play Store keys and permissions.

So, it means that the IAP work only in shipping mode and that you can’t test them directly from the Android quick launch anymore?

Unfortunately, after spending days on it, this was the only way I was able to test the in-app purchases (IAP) in a real scenario. Initially, configuring and setting up everything in the Play Console was a hassle, but now I simply compile a new version.

You can still test it immediately just to ensure the nodes are functioning correctly, but be aware that they will return simulated data. I preferred to test it right away in a real scenario, although it’s still an internal test, so nothing is published yet. I would suggest you could test in debug mode, but you need to configure your debug keys in the Google Play Console. I might try that next.

Okay thanks!

And for the ads not working anymore on this version, any ideas? :stuck_out_tongue:

I’m not using ads in my games. However, you might want to consider using a plugin. One of the plugins I’m considering buying, should I encounter more issues, is offered by Nineva Studios. For now, I’m good, but if I need to purchase one, I would choose them because their Discord is very active and their support seems good. You can check them out here: Nineva Studios on Unreal Engine Marketplace.

1 Like

Try updating the code for the AndroidAdvertising_APL.xml. It worked for me on version 5.4.2, with both banner and interstitial ads functioning correctly.
image

My AndroidAdvertising_APL.xml :
AndroidAdvertising_APL.xml (13.8 KB)

Hey, I just want to know is this GDPR compliant? I couldn’t see any GDPR consent messaging in this APL. I think we need to request the consent even before initializing the ad sdk right?

No, this is not GDPR compliant. The file is a temporary fix to the error of GameActivity.java when you try to implement AdMob in version 5.4.2.

Okay. Thanks for letting me know.

Would this help with UE 5.2.1? I think the most significant difference in my .apl is the dependencies. Mine are set to 23.3.0 and yours are version 22.6. Ive read around a lot and ive heard that newer versions of admob are broken. Do you think it is safe to just swap mine out for yours to test?