I have an AAR for an SDK (Azure speech services) that I have placed in the Assets/Plugins/Android folder. The AAR file is marked in Unity for inclusion in the Android build.
I have a SpeechEngine.java source file also in the same directory. According to the 2018.2 documentation, this should build the SpeechEngine.java file as a plugin using the Gradle build.
Indeed, I’m getting that file being compiled, but it doesn’t seem to have access to the classes in the AAR. I’m getting a bunch of errors like:
CommandInvokationFailure: Gradle build failed. C:\Program Files\Java\jdk1.8.0_181\bin\java.exe -classpath "C:\Unity\2018.2.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease" stderr[ C:\Temp\AndroidSpeechTest\Temp\gradleOut\src\main\java\SpeechEngine.java:57: error: cannot find symbol final SpeechRecognizer reco = new SpeechRecognizer(speechConfig, audioInput);
How do I add the AAR file to the classpath for compiling this Java source file?