简体   繁体   English

即时应用模块化

[英]Instant App modularization

I've been working on instant app for a few days. 我已经在即时应用程序上工作了几天。 I didn't get it compiled yet. 我还没有编译它。

The project is split into instant , installed , base , export , preview as features. 该项目分为instantinstalledbaseexportpreview等功能。

In export module relies on some layouts, string resources from the base module. export模块中,依赖于某些布局,该字符串来自base模块。 Then installed will compile base and export module. 然后installed将编译baseexport模块。 Everything just works 一切正常

However, in preview does the same thing like some layouts, string resources from the base module. 但是,在preview会执行某些操作,例如某些布局, base模块中的字符串资源。 Both export and preview do different things but use the same resources. exportpreview都做不同的事情,但是使用相同的资源。 instant module will compile base , preview but get an error below instant模块将编译basepreview但低于得到一个错误

Unresolved reference: id
Unresolved reference: layout
Unresolved reference: anim

Is that a expected behavior from build tool, or a bug from build tool? 这是构建工具的预期行为,还是构建工具的错误?

When building an instant app, the feature module's R class doesn't contain resource identifiers from the base feature. 在构建即时应用程序时,功能模块的R类不包含来自基本功能的资源标识符。 For all resources that come via the base feature, you should change the import to the base feature R class. 对于通过基本要素获得的所有资源,应将导入更改为基本要素R类。 (base.R instead of preview.R) (以base.R代替preview.R)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM