Hey, I am trying to build an Apk from my “game”. But the build is failing every single time with the error below. I have searched everywhere but i unfortunately found no solution to my problem. One thing that i tried was reinstalling unity and downgrading my gradle to 6.9.4 from 7.2, but this only gave me more errors (also below).
Does someone maybe know what i am doing wrong? Thanks!
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
C:\Users\-\Desktop\code\Pocket-Dealership\Pocket Dealership\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity\androidnotifications\UnityNotificationManager.java:164: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
^
symbol: variable TIRAMISU
location: class VERSION_CODES
C:\Users\-\Desktop\code\Pocket-Dealership\Pocket Dealership\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity\androidnotifications\UnityNotificationManager.java:165: error: cannot find symbol
permissionGranted = mContext.checkCallingOrSelfPermission(Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED;
^
symbol: variable POST_NOTIFICATIONS
location: class permission
Note: C:\Users\-\Desktop\code\Pocket-Dealership\Pocket Dealership\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':unityLibrary:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:C:\Users\-\Desktop\code\Pocket-Dealership\Pocket Dealership\Library\Bee\Android\Prj\Mono2x\Gradle\launcher\build\intermediates\packaged_manifests\release\AndroidManifest.xml:61: AAPT: error: attribute android:export not found.
* Try:
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.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
]
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\-\Desktop\code\Pocket-Dealership\Pocket Dealership\Library\Bee\Android\Prj\Mono2x\Gradle\launcher\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin 'com.android.internal.version-check'.
> Minimum supported Gradle version is 7.2. Current version is 6.9.4. If using the gradle wrapper, try editing the distributionUrl in C:\Users\-\Desktop\code\Pocket-Dealership\Pocket Dealership\Library\Bee\Android\Prj\Mono2x\Gradle\gradle\wrapper\gradle-wrapper.properties to gradle-7.2-all.zip
* Try:
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.
* Get more help at https://help.gradle.org