Android Plugin - .aar file missing R$raw reference
I have an android (.aar) plugin in my Unity project's Assets/Plugins/Android/ folder. It compiles, however during runtime, I'm getting a missing resource class runtime exception:
AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/upsight/android/managedvariables/R$raw;
I have all the res files compiled in the .aar file, I can even see them when the project is being built in Temp/StagingArea/bin/classes/my/package/name/mygamename/R$raw.class However, for some reason these resource files aren't being compiled into my final .apk.
I double checked and decompiled the R$raw.class, the resource value that's being marked as missing in runtime is present there.
I decompiled the .apk as well and noticed in the res folder that there wasn't even a /res/raw folder.
Do I need to manually drop my res files into Assets/Plugins/Android/? Do I need to build with Unity's gradle system, I'm currently using the internal default build system (if yes, where can I modify the build.gradle file)? Any other ideas?
Thanks.
Your answer
Follow this Question
Related Questions
Weird Issue: Textures become transparent when running from the editor in an android platform 0 Answers
XML Loading works in PC... but not in Android 0 Answers
How to get the low level rendering plugin working on Android? 1 Answer
CommandInvokationFailure: Failed to recompile android resource files. 0 Answers
Android java plugin only works in a developement build 1 Answer