I've create a module at Android Studio. In module code, I want to show a dialog which uses a layout defined in the module. When I reference layout like net.gwtr.module.R.layout.my_dialog_layout, I got exception like this;
java.lang.ClassNotFoundException: Didn't find class "net.gwtr.module.R$layout" on path: DexPathList[[zip file "/data/app/net.gwtr.moduletest-1.apk"],nativeLibraryDirectories=[/data/app-lib/net.gwtr.moduletest-1, /vendor/lib, /system/lib]]
I think the reason is that resources are merged when you add a module to project. It did not create different resource ids for the module package name. So i cannot reach to resources from module package.
How can I reference resources of module in module code?
0 comments:
Post a Comment