4.27.2 Android Packaging Error 'java:372: error: cannot find symbol'

D_Artagnan69
Tue, 14 Mar 2023 18:17:49 +0000
Mobile

My game which used to package without any error is now failing with this error ‘UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:372: error: cannot find symbol’ also attached the output log. I hadn’t changed anything in the project settings or in Android Studio, the last time I packaged was on 19 Feb 2023 and it was fine but when I tried to package it yesterday 13 March 2023, it failed with this error. I have no idea what is causing it, I have tried reinstalling Android Studio, removing and adding Api and build tools several times but I cannot solve this. No solutions from other discussions are working. I’m literally losing my mind over this. Please help.

UATHelper: Packaging (Android (ASTC)): Fixing minSdkVersion; requires minSdkVersion of 21 for App Bundle support
UATHelper: Packaging (Android (ASTC)): Copied file D:\UE PROJECT\Run Gunner\MyProject\Intermediate\Android\gradle\app\src\main\jniLibs\arm64-v8a\libc++_shared.so.
UATHelper: Packaging (Android (ASTC)): Copied file D:\UE PROJECT\Run Gunner\MyProject\Intermediate\Android\gradle\app\src\main\jniLibs\arm64-v8a\libUE4.so.
UATHelper: Packaging (Android (ASTC)): Copied file D:\UE PROJECT\Run Gunner\MyProject\Intermediate\Android\gradle\app\src\main\libs\arm64-v8a\libplaycore.so.
UATHelper: Packaging (Android (ASTC)): Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
UATHelper: Packaging (Android (ASTC)): Making .aab with Gradle...
UATHelper: Packaging (Android (ASTC)): To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.1.1/userguide/gradle_daemon.html.
UATHelper: Packaging (Android (ASTC)): Daemon will be stopped at the end of the build stopping after processing
UATHelper: Packaging (Android (ASTC)): > Task :app:preBuild UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :app:extractProguardFiles
UATHelper: Packaging (Android (ASTC)): > Task :app:preReleaseBuild
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:preBuild UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:preReleaseBuild UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:packageReleaseRenderscript NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:preBuild UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:preReleaseBuild UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:packageReleaseRenderscript NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :app:compileReleaseRenderscript NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :app:generateReleaseResValues
UATHelper: Packaging (Android (ASTC)): > Task :app:generateReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:compileReleaseRenderscript NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:generateReleaseResValues
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:generateReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:packageReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:generateReleaseResValues
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:compileReleaseRenderscript NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:generateReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:packageReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :app:createReleaseCompatibleScreenManifests
UATHelper: Packaging (Android (ASTC)): > Task :app:extractDeepLinksRelease
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:extractDeepLinksRelease
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:extractDeepLinksRelease
UATHelper: Packaging (Android (ASTC)): > Task :app:mergeReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:processReleaseManifest
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:compileReleaseLibraryResources
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:processReleaseManifest
UATHelper: Packaging (Android (ASTC)): > Task :app:processReleaseManifest
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:compileReleaseLibraryResources
UATHelper: Packaging (Android (ASTC)): > Task :app:mergeReleaseShaders
UATHelper: Packaging (Android (ASTC)): > Task :app:compileReleaseShaders NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :app:generateReleaseAssets UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:mergeReleaseShaders
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:compileReleaseShaders NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:generateReleaseAssets UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:packageReleaseAssets
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:mergeReleaseShaders
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:compileReleaseShaders NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:generateReleaseAssets UP-TO-DATE
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:packageReleaseAssets
UATHelper: Packaging (Android (ASTC)): > Task :app:mergeReleaseAssets
UATHelper: Packaging (Android (ASTC)): > Task :app:bundleReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:compileReleaseAidl NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:generateReleaseBuildConfig
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:javaPreCompileRelease
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:generateReleaseBuildConfig
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:compileReleaseAidl NO-SOURCE
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:parseReleaseLocalResources
UATHelper: Packaging (Android (ASTC)): > Task :app:checkReleaseDuplicateClasses
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:javaPreCompileRelease
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:generateReleaseRFile
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:compileReleaseJavaWithJavac
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:mergeReleaseGeneratedProguardFiles
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:parseReleaseLocalResources
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:exportReleaseConsumerProguardFiles
UATHelper: Packaging (Android (ASTC)): > Task :app:generateReleaseBuildConfig
UATHelper: Packaging (Android (ASTC)): > Task :app:compileReleaseAidl
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:generateReleaseRFile
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:compileReleaseJavaWithJavac
UATHelper: Packaging (Android (ASTC)): Note: Z:\permission_library\src\main\java\com\google\vr\sdk\samples\permission\PermissionFragment.java uses or overrides a deprecated API.
UATHelper: Packaging (Android (ASTC)): Note: Recompile with -Xlint:deprecation for details.
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:mergeReleaseGeneratedProguardFiles
UATHelper: Packaging (Android (ASTC)): > Task :app:javaPreCompileRelease
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:exportReleaseConsumerProguardFiles
UATHelper: Packaging (Android (ASTC)): > Task :app:processReleaseResources
UATHelper: Packaging (Android (ASTC)): > Task :downloader_library:bundleLibCompileToJarRelease
UATHelper: Packaging (Android (ASTC)): > Task :permission_library:bundleLibCompileToJarRelease
UATHelper: Packaging (Android (ASTC)): > Task :app:compileReleaseJavaWithJavac FAILED
UATHelper: Packaging (Android (ASTC)): The following annotation processors are not incremental: lifecycle-compiler-2.0.0.jar (androidx.lifecycle:lifecycle-compiler:2.0.0).
UATHelper: Packaging (Android (ASTC)): Make sure all annotation processors are incremental to improve your build speed.
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:372: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                             if( ownedProduct.getSku().equals(RestoreProductIDs[Idy]) )
UATHelper: Packaging (Android (ASTC)):                                             ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable ownedProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:377: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                                     Log.debug("[GooglePlayStoreHelper] - GooglePlayStoreHelper::RestorePurchases - Found Consumable Flag for Product " + ownedProduct.getSku() + " bConsumable = " + bTryToConsume);
UATHelper: Packaging (Android (ASTC)):                                                                                                                                                                      ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable ownedProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:386: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                             Log.debug("[GooglePlayStoreHelper] - GooglePlayStoreHelper::RestorePurchases - Attempting to consume " + ownedProduct.getSku());
UATHelper: Packaging (Android (ASTC)):                                                                                                                                                  ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable ownedProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:394: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                                         Log.debug("[GooglePlayStoreHelper] - GooglePlayStoreHelper::RestorePurchases - Purchase restored for " + constProduct.getSku());
UATHelper: Packaging (Android (ASTC)):                                                                                                                                                              ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable constProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:398: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                                         f_ownedSkus.add(constProduct.getSku());
UATHelper: Packaging (Android (ASTC)):                                                                     ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable constProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:403: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                                         Log.debug("[GooglePlayStoreHelper] - GooglePlayStoreHelper::RestorePurchases - consumePurchase failed for " + constProduct.getSku() + " with error " + billingResult.getResponseCode());
UATHelper: Packaging (Android (ASTC)):                                                                                                                                                                   ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable constProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:424: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                             Log.debug("[GooglePlayStoreHelper] - GooglePlayStoreHelper::RestorePurchases - Purchase restored for " + constProduct.getSku());
UATHelper: Packaging (Android (ASTC)):                                                                                                                                                  ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable constProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:428: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                             f_ownedSkus.add(constProduct.getSku());
UATHelper: Packaging (Android (ASTC)):                                                         ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable constProduct of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:472: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                 ownedSkus.add(purchase.getSku());
UATHelper: Packaging (Android (ASTC)):                                       ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable purchase of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:566: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                 final String sku = purchase.getSku();
UATHelper: Packaging (Android (ASTC)):                                            ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable purchase of type Purchase
UATHelper: Packaging (Android (ASTC)): Z:\app\src\main\java\com\epicgames\ue4\GooglePlayStoreHelper.java:583: error: cannot find symbol
UATHelper: Packaging (Android (ASTC)):                 final String sku = purchase.getSku();
UATHelper: Packaging (Android (ASTC)):                                            ^
UATHelper: Packaging (Android (ASTC)):   symbol:   method getSku()
UATHelper: Packaging (Android (ASTC)):   location: variable purchase of type Purchase
UATHelper: Packaging (Android (ASTC)): Note: Some input files use or override a deprecated API.
UATHelper: Packaging (Android (ASTC)): Note: Recompile with -Xlint:deprecation for details.
UATHelper: Packaging (Android (ASTC)): 11 errors
UATHelper: Packaging (Android (ASTC)): 45 actionable tasks: 45 executed
UATHelper: Packaging (Android (ASTC)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ASTC)): * What went wrong:
UATHelper: Packaging (Android (ASTC)): Execution failed for task ':app:compileReleaseJavaWithJavac'.
UATHelper: Packaging (Android (ASTC)): > Compilation failed; see the compiler error output for details.
UATHelper: Packaging (Android (ASTC)): * Try:
UATHelper: Packaging (Android (ASTC)): 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 (ASTC)): * Get more help at https://help.gradle.org
UATHelper: Packaging (Android (ASTC)): BUILD FAILED in 16s
UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c "D:\UE PROJECT\Run Gunner\MyProject\Intermediate\Android\gradle\rungradle.bat" :app:bundleRelease
UATHelper: Packaging (Android (ASTC)):        (see C:\Users\D'Art\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE_4.27\Log.txt for full exception trace)
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED
PackagingResults: Error: Unknown Error

23 posts - 4 participants