Android Packaging fails on x86_64


I want to package with x86 to work with the Android emulator, but I get an error.
Packaging with armv7 was successful, and I confirmed the operation with a smartphone.

It is an error content. Please refer to the attached file for details.

D:\UE4Code\u4.22\Engine\Source\Runtime\ApplicationCore\Private\Android\AndroidJavaMediaPlayer.cpp(33,87): error: return type of out-of-line definition of ‘FJavaAndroidMediaPlayer::GetMediaDataSourcePtr’ differs from that in the declaration
TSharedPtr FJavaAndroidMediaPlayer::GetMediaDataSourcePtr(int64 Identifier)

D:\UE4Code\u4.22\Engine\Source\Runtime\ApplicationCore\Private\Android\AndroidJavaMediaPlayer.cpp(39,61): error: no viable conversion from ‘TWeakPtr<[…], 0>’ to ‘TWeakPtr<[…], ESPMode::ThreadSafe aka 1>’
TWeakPtr MediaDataSource = AllMediaDataSources.FindRef(Identifier);

D:\UE4Code\u4.22\Engine\Plugins\Runtime\Oculus\OculusVR\Source\OculusHMD\Private\OculusHMDPrivate.cpp(69,33): error: unknown type name ‘FPose’

The Oculus HMD error has been eliminated by disabling the Oculus VR plugin.
But I do not know how to fix AndroidJavaMediaPlayer error

Android packaging failed in the following environment.

OS: windows8.1

UE4: 4.22.3

Visual Stodio: Community 2017

Android Studio: 3.4.1


[link text][4]
[link text][5]

I’m also having this problem, I’ve yet to find a solution.


I’m facing the same issue. Can anyone please suggest if this issue is fixed.


I suggest you go to your Project’s folder and delete intermediate folder there and then try packaging again.

The intermediate file has been deleted. But the build fails with the same error.

Definition(AndroidJavaMediaPlayer.h) and Declaration(AndroidJavaMediaPlayer.cpp) of method GetMediaDataSourcePtr should be modified.




  • TWeakPtr<[…], ESPMode::ThreadSafe aka 1>’ should be ‘TWeakPtr<[…], 0>’

My code snippet can’t be applied correctly this site… speechless

but I bet you will encounter another bug after fixing this :]