Cannot resolve resource bundle in Flex source code in Ultimate 2016.3
Answered
Hi,
Since I have upgraded to IDEA Ultimate 2016.3, the following lines of code get flagged with "Cannot resolve resource bundle" error.
<fx:Metadata>
[ResourceBundle("foo")]
</fx:Metadata>
this.resourceManager.getString('foo', 'bar');
The project directory structure is as follows:
myProject/src
myProject/src/main
myProject/src/main/flex
myProject/src/main/flex/...mxml
myProject/src/main/resources
myProject/src/main/resources/locale
myProject/src/main/resources/locale/en_US
myProject/src/main/resources/locale/en_US/foo.properties
myProject/src/test
The project iml file has the following segment:
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/flex" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
</content>
For some reason, IDE cannot pick up "foo.properies" under source directory with the default locale, i.e. "myProject/src/main/resources/locale/en_US. Interestingly I didn't have this problem with version 15 before the upgrade.
Any help is appreciated.
Please sign in to leave a comment.
Hello, Jiang!
Please mark en_US folder as sources in File | Project structure | Modules.
@..., thanks, it worked for me !