Hello,
I am using UE 5.3 and trying to implement in app purchases. Signing in to Google Play and Leaderboards work but the second any of the 2 in app purchases nodes are called, the app crashes. There isn’t anything online about this issue. I have tried different Android Studio versions, different SDK versions, different NDK versions, different JDK versions and still no luck! I am using Blueprints not C++.
Error from log:
Assertion failed: false && “Java JNI call failed with an exception.” [File:./Runtime/Core/Private/Android/AndroidJavaEnv.cpp] [Line: 231]
I am using 1 plugin called EasyAdsPro for ads but the problem I am having is related to In-App-Purchases
The project is all blueprints.
I got the packaging to work using:
Flamingo 2022.2.1 Patch 2
Android SDK 33
NDK r25b
JDK 20 (also tried 17,18,19)
Please find attached the nodes that crash the game once they are called with the error specified in the job posting
Have we gotten confirmation that this is indeed an issue with UE and not something we are doing wrong? Seems like this issue would be much bigger than it is if it was broken for everybody. Especially since iOS broke as of UE 5.1, which was released about 1 year ago. And Android as of UE 5.3, which is coming up on 6 months.
Out of all of the hundreds/thousands of UE games, we are the only ones seeing and reporting this problem in the last year?
I’m starting to believe they hate mobile developers. I’ve spent months looking for solutions and the problem is with them. 5.3.2 Same problems / 5.4 Same problems / 5.4.4 Same problems
The only version I didn’t have any problems with on Android was the version 4.27, but it’s impossible for me to go back to this one because even downgrading projects they make it a nightmare.
I’ve checked the source code for UE5.7, and it seems that Epic has fixed the files that were causing the issue!
I don’t know yet if IAPs will work, I’m currently uploading a shipping build on the Play Console and I’ll try when the app is approved.
Quick guide to fix all the errors you may encounter:
Java 21
NDK 27.2 (not the 27.0, it doesn’t work)
Disable the plugin “Online Subsystem Google”. It is now totally obsolete, you need to use the “Online Subsystem Google Play” plugin now.
The “Support admob” feature is a bit broken. Go to “Engine\Source\Runtime\Advertising\Android\AndroidAdvertising” and replace the file “AndroidAdvertising_APL.xml” with this one.
Go to “UE_5.7\Engine\Build\Android\Java\gradle\app” and open build.gradle. At the very end under “dependencies”, add these 2 lines:
You don’t need the AndroidManifestOverride.txt anymore. All default authorizations have been removed.
If you had “Extra tags for manifest node”, you need to remove them or the engine will refuse to compile.
I’ll keep you up-to-date!
Update : IAPs still don’t work. But at least the 5.7 version is compliant with the new Google Play rules like the 16KB memory pages.
Update 2 : IT WORKS GUYS! IAP ARE NOW WORKING ON UNREAL 5.7!
SOLUTION:
In “Engine\Plugins\Online\Android\OnlineSubsystemGooglePlay\Source”, you have a file called “OnlineSubsystemGooglePlay_UPL.xml”.
Inside, you have this:
The thing is, usually you are supposed to set this value on true or false inside the file “AndroidGame.ini” of your project. That’s what the official documentation always said.
I don’t know when it stopped working or even if it was related with the other issue, but: you just have to set the default value on “true” directly in the “OnlineSubsystemGooglePlay_UPL.xml” file.
Create a shipping build, upload it on Google Play… and enjoy the IAPs!
Note that it will only work in Closed Testing, Open Testing and Production. It won’t work in Quick Launch or in internal sharing.