Incorrect 'applicationPackage' in imports when in buildType with the custom suffix
johannesplanis opened this issue · comments
I was building the template just for the same purpose, when I encountered your solution.
I am using the dependency from within the project in my activity, and wanted to include import to it from the template based on the package name.
I have the debug buildType, which appends the custom ".test" suffix to the packageId for debug purposes.
Based on that, when in AS I have set one of the debug Build Variants, the template generates import with suffixed packageId, that of course causes errors.
I saw that you in the Activity template, removed the import of R, which is present in out-of-the-box templates in AS, namely this line:
import ${applicationPackage}.R;
so I suspect that you may have encountered similiar problems.
Do we have any field in templating to extract just the base packageId for the purpose of imports?
I couldn't find that field. However, I haven't spent too much time on it. If you find it, can you share with me?
Sure, I also asked the question on caster.io under the relevant course.
Okay, thanks.