I'm trying to build my app that uses R.raw.resource_name, but i get the following error:
Missing class my.package.name.R$raw (referenced from: void my.package.name.ClassName.<init>(android.content.Context, boolean, java.util.List))
Adding this line to proguard-rules.pro doesn't resolve the error:
-keep class my.package.name.R$raw
-dontwarn with the same class allows to build the app, but fails in runtime:
-dontwarn my.package.name.R$raw
What is the proper way to handle this?
I've found the issue, when renaming a raw file without extension Android Studio adds a dot in the end. So the issue was that i had
tmp.file inistead oftmp. This was not detected in the syntax highlighting, but failed the buid. Renaming the file helped.