Download

UE4.25 Android packaging error

I decided to port my project to 4.25 from 4.24. I set up Android Studio and all that. But I’m getting this error when trying to package for Android(ETC2).
I see that it’s says some java modules are missing, but how do I fix this?

**Log : **


UATHelper: Packaging (Android (ETC2)): > Task :app:compileDebugJavaWithJavac
UATHelper: Packaging (Android (ETC2)): Gradle may disable incremental compilation as the following annotation processors are not incremental: lifecycle-compiler-2.0.0.jar (androidx.lifecycle:lifecycle-compiler:2.0.0).
UATHelper: Packaging (Android (ETC2)): Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.
UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:211: error: cannot find symbol
UATHelper: Packaging (Android (ETC2)): import android.support.v4.app.NotificationManagerCompat;
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): symbol: class NotificationManagerCompat
UATHelper: Packaging (Android (ETC2)): location: package android.support.v4.app
UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:212: error: package android.support.v4.content does not exist
UATHelper: Packaging (Android (ETC2)): import android.support.v4.content.FileProvider;
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4
etwork\NetworkChangedManager.java:25: error: cannot find symbol
UATHelper: Packaging (Android (ETC2)): private Set<WeakReference<NetworkChangedListener>> networkChangedListeners = new HashSet<>();
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): symbol: class NetworkChangedListener
UATHelper: Packaging (Android (ETC2)): location: class NetworkChangedManager
UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4
etwork\NetworkChangedManager.java:84: error: cannot find symbol
UATHelper: Packaging (Android (ETC2)): public boolean addListener(WeakReference<NetworkChangedListener> listener) {
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): symbol: class NetworkChangedListener
UATHelper: Packaging (Android (ETC2)): location: class NetworkChangedManager
UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4
etwork\NetworkChangedManager.java:89: error: cannot find symbol
UATHelper: Packaging (Android (ETC2)): public boolean removeListener(WeakReference<NetworkChangedListener> listener) {
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): symbol: class NetworkChangedListener
UATHelper: Packaging (Android (ETC2)): location: class NetworkChangedManager
UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4
etwork\NetworkConnectivityClient.java:6: error: package android.support.annotation does not exist
UATHelper: Packaging (Android (ETC2)): import android.support.annotation.NonNull;
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)):
UATHelper: Packaging (Android (ETC2)): Z:\app\src\main\java\com\epicgames\ue4
etwork\NetworkConnectivityClient.java:15: error: cannot find symbol
UATHelper: Packaging (Android (ETC2)): void initNetworkCallback(@NonNull Context context);
UATHelper: Packaging (Android (ETC2)): ^
UATHelper: Packaging (Android (ETC2)): symbol: class NonNull
UATHelper: Packaging (Android (ETC2)): location: interface NetworkConnectivityClient
UATHelper: Packaging (Android (ETC2)): 7 errors
UATHelper: Packaging (Android (ETC2)): > Task :app:compileDebugJavaWithJavac FAILED
PackagingResults: Error: cannot find symbol
PackagingResults: Error: package android.support.v4.content does not exist
PackagingResults: Error: cannot find symbol
PackagingResults: Error: cannot find symbol
PackagingResults: Error: cannot find symbol
PackagingResults: Error: package android.support.annotation does not exist
PackagingResults: Error: cannot find symbol
UATHelper: Packaging (Android (ETC2)):
UATHelper: Packaging (Android (ETC2)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ETC2)):
UATHelper: Packaging (Android (ETC2)): * What went wrong:
UATHelper: Packaging (Android (ETC2)): Execution failed for task ':app:compileDebugJavaWithJavac'.
UATHelper: Packaging (Android (ETC2)): > Compilation failed; see the compiler error output for details.
UATHelper: Packaging (Android (ETC2)):
UATHelper: Packaging (Android (ETC2)): * Try:
UATHelper: Packaging (Android (ETC2)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
UATHelper: Packaging (Android (ETC2)):
UATHelper: Packaging (Android (ETC2)): * Get more help at https://help.gradle.org
UATHelper: Packaging (Android (ETC2)):
UATHelper: Packaging (Android (ETC2)): BUILD FAILED in 35s
UATHelper: Packaging (Android (ETC2)): 31 actionable tasks: 31 executed
UATHelper: Packaging (Android (ETC2)): ERROR: cmd.exe failed with args /c "D:\UnrealEngine\2019\December\MobilePong 4.25\Intermediate\Android\armv7\gradle\rungradle.bat" :app:assembleDebug
PackagingResults: Error: cmd.exe failed with args /c "D:\UnrealEngine\2019\December\MobilePong 4.25\Intermediate\Android\armv7\gradle\rungradle.bat" :app:assembleDebug
UATHelper: Packaging (Android (ETC2)): Took 87.9822946s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool failed. See log for more details. (C:\Users\UserName\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UnrealEngine+UE_4.25\UBT-MobilePong-Android-Shipping_2.txt)
UATHelper: Packaging (Android (ETC2)): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults: Error: Unknown Error

Looks like the problem was with a plugin I used. Removed the plugin. Now the Build is successful.

Hello,

which plugin it was exactly? I have the same error and dont know how to fix it. Can you give me some suggestion?

Thank you

Any word on this? I’m also having a similar issue and can’t figure it out.

Hi, anyone got a solution for this? Happens for me on 4.25 also.

2 Likes

Same problem here. What causes this? 4.25 seams to be so full of bugs when it comes to packing for android…

1 Like

Has anyone managed to fix this problem? I’m on the latest version of the Oculus engine build.

1 Like

In my case it was a “websocket” plugin I got from Github. The project has since been deleted. It had a UPL file which copied some files and enabled AndroidX (android.useAndroidX=true & android.enableJetifier=true) I commented out everything in that file and I managed to package successfully. But now the game crashes on launch, not sure if it’s related to the plugin.

There will be some problem with SDK installation, go to the android folder in unreal installation and run setup.bat as admin. then use that path for SDK.

I have exactly the same problem. Appeared because of the EasyAds plugin. Without the plugin, EasyAds compiles successfully. Has anyone fixed this error?

I have the same exact problem and I am using EasyAds plugin. Has anyone been able to fix this??

Did you find a solution?
Even if you have ue 4.25, I think you use Easyads plugin’s old version (ue 4.24). The publisher of this plugin removed it in the marketplace. The new version is paid.
Is this true?

still couldnt fix this error… i am using Advanced Framework plugin.

I have the same problem. could you decide?

I Got This Error When I Rename My Project
My Other Projects Are successfully Exported But This Project Is Show This Error I don’t know How To fix It.
Please Help…

You need to delete folders from your Intermediate folder.

I cleared everything but what’s there in a fresh build. kept the config and reimportCache folders and the CachedAssetRegistry.bin file and deleted everything else that was created when I packaged previously.

Hope that helps :slight_smile: