#Android Gradle Build Error

1 messages · Page 1 of 1 (latest)

copper ibex
#

Hey - I am trying to get the demo scenes to build for Android, but running into errors. iOS has built just fine and works, just not Android. I am using Unity 2022.3.16f1

Full error logs below v

copper ibex
#

Looks like this might be the specific part of the error that is relevant:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/Users/blazing/.gradle/wrapper/dists/gradle-5.1.1-bin/90y9l8txxfw1s2o6ctiqeruwn/gradle-5.1.1/lib/groovy-all-1.0-2.5.4.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/blazing/UnityProjects/EasyMLDemo/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle' line: 1025

* What went wrong:
Execution failed for task ':process_androidx.annotation.annotation-experimental-1.4.0.aar'.
> Unsupported class file major version 61

* 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 2m 3s```

Looks like one of the linked packages isn't compatible with the java version unity is using?
chrome shadow
#

Hi

#

Do you have any other plugins installed?
Can you please try this?

  1. Enable Custom Main Gradle Template option
  2. Force Resolve libraries from EDMU
  3. Try making a build
copper ibex
#

I’ve done this in just an empty project with just the easy ml kit plug-in, as well as my existing project - both the same. Will try custom main gradle template shortly and let you know…

copper ibex
#

OK Enabling Custom Main Gradle Template (and also Custom Gradle Properties Template which EDMU said was needed), Force Resolve completes successfully.

Building for android failed, but I ran EDMU -> Delete Resolved Libraries, deleted the files in Plugins/Android/**.aar and then resolved again and built and it worked 👍

#

Playing around with it a bit further now, my game is crashing running out of memory when barcode scanning is in action but i will debug that more myself now