简体   繁体   English

Android Studio-Canary 8:无法访问功能模块和库模块中的资源

[英]Android Studio - Canary 8: Can't access the resources in feature modules and library modules

I can't access to the feature module resources and the resources from another library which is included as an API in InstantApp. 我无法访问功能模块资源以及来自InstantApp中作为API包含的另一个库的资源。 The only place where it recognises to get resources is the base feature class. 它唯一识别获得资源的地方是基础要素类。 I have the following sample: when I run the application there are several Fragment classes in the feature module which have to be loaded along with the layouts also located in that module, but it always fails with 我有以下示例:运行应用程序时,功能模块中有几个Fragment类,这些类必须与该模块中的布局一起加载,但始终失败

Caused by: android.content.res.Resources$NotFoundException: 

Tried to exclude Multi-Dexing, other modules, also disabled the aapt2, after which it has started to complain about not found views. 试图排除Multi-Dexing,其他模块也禁用了aapt2,此后它开始抱怨找不到视图。

What could be the reason of this? 这可能是什么原因?

A bug is reported here. 此处报告了一个错误。

With reference to Google issue tracker , it has been fixed with Android SDK Built-Tools to 27.0.2 关于Google问题跟踪工具 ,它已通过Android SDK Built-Tools修复为27.0.2。

Please update your Android SDK Built-Tools to 27.0.2 And ensure you are on Android Studio 3.0.1 or newer. 请将您的Android SDK内置工具更新为27.0.2,并确保您使用的是Android Studio 3.0.1或更高版本。

If any issue persists, please report at Google issue tracker they will re-open to examine. 如果仍然存在任何问题,请向Google问题跟踪器报告,他们将重新打开进行检查。

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

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