The Mobile Location Services - Android Implementation plugin causes Packaging error. Help!!

The “Mobile Location Services - Android Implementation” plugin causes the packaging to fail with the error code:

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

The solution is to disable the plugin but the problem is that my project needs the plugin.

If the plugin is disabled and the packaging was a sucess when starting the game on a phone and giving acess to the game to get my location data, it always fails at the “Start Location Services” node.

Is there a way to do it without the plugin or is there a fix for the plugin? Please Help!

2 Likes

Someone please

You should present more details if you really want someone to help you…
which UE version , android sdk version you are packing…

Okay!

I’m using the 25.1.8937393 NDK and the 17th JDK.


image
and the 2024.2.1 version of Android Studio

Okay, I managed to fix the error!:partying_face:

The error was caused by the 731st line in the GameActivity.java: “activityContext.runOnUiThread(new Runnable()

Problem:
The problem was that activitycontext dosen’t have the runOnUiThread event the _activity has that event which I found out by going to D:\UE5ProjectsOnD\AndroidRenderText 5.5\Intermediate\Android\arm64\src\com\epicgames\unreal and at the 3830th line it says _activity.runOnUiThread(new Runnable() which you can fix easly by changing the activityContext to _activity in the GameActivity.java, butttt… Unreal every time regenerates the GameActivity.java so we need to change the plugin to put _activity instead of activityContext.

Solution:
Go to UE_5.5\Engine\Plugins\Runtime\LocationServicesAndroidImpl\Source\LocationServicesAndroidImpl and open the LocationServicesAndroidImpl_UPL.XML file and search for activityContext.runOnUiThread and simply just change the activityContext to _activity.

I hope I helpled you :smiley:
Epic, please fix this error because for a beginner it’s very hard to fix this error then you just rewriting a word.

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