Android Instant Apps - Cannot Find Symbol From Base Feature Asset

前端 未结 1 1300
有刺的猬
有刺的猬 2021-01-06 20:25

I have a base feature module, and a feature module (you could call it the \"child\"). The base feature module has a strings.xml file asset containing:

相关标签:
1条回答
  • 2021-01-06 20:36

    Your base and child modules have different package names - let's say they are com.example.base and com.example.child. Each contains its own set of resources, and their identifiers will be collected in separate R packages:

    • com.example.base.R
    • com.example.child.R

    Because you're trying to access a resource defined in base module, you need to reference it with the fully qualified name of the variable, which is com.example.base.R.string.app_string.

    0 讨论(0)
提交回复
热议问题