Error retrieving strings from SharedResources

I am in the process of trying to move our team to using IntelliJ for our Adobe Flex application. The application builds fine from the command line (mvn) or when compiling from within Adobe's Flash Builder. However, I am getting the following error when compiling from IntelliJ:

Error:[ui-vcloud-lib]: could not find source for resource bundle SharedResources.

However, this error only happens when building from within IntelliJ. When an official build is kicked off, mvn is able to compile the project without a problem.
Screen Shot 2015-12-15 at 5.16.53 PM.png
From the comment in the existing code (above), it looks like SharedResources should be provided by the SDK.  I found this version of online,

What is SharedResources? Is it no longer valid in some version of the Flex SDK? Why would it work on Adobe Flash Builder? Intellij and Flash Builder are both pointing to the same location for the Flex SDK (4.1).


Comment actions Permalink bundle is located in [Flex SDK]/frameworks/locale/[any locale]/framework_rb.swc and is added to the compiler classpath by default. You could occasionally wipe it out from the classpath by tweaking Compiler Options or using additional compiler configuration file. Please attach a screenshot of Project Structure | Modules | ui-vcloud-lib module | its build configuration subnode | Compiler Options tab and attach ui-vcloud-lib.iml file and additional compiler configuration file (if used).

Comment actions Permalink

Hello Alexander,

Thanks for your help. I did find the locale files under /bldmnt/toolchain/noarch/adobe-flex-sdk-4.1/frameworks/locale/en_US. I also went to the Compiler options and added "en_US ". All the other settings were created when I imported the .project files that were used for Adobe Flash Builder. Ading "en_US" did fix the compile error; however, the squiggly red mark under  "[ResourceBundle("SharedResources")]"  is still there.

The additional compiler options are set to ( The paths were not working when I initially tried it, I changed the paths to use $MODULE_DIR$ and IntelliJ automatically expanded them for me, which is bad because I wanted to be able to generate that file).

-load-config+=/Users/jmendes/p4client/spmain2/ui/ssui/ui-vcloud-lib/.flexConfig.xml -include-sources /Users/jmendes/p4client/spmain2/ui/ssui/ui-vcloud-lib/target/ /Users/jmendes/p4client/spmain2/ui/ssui/ui-vcloud-lib/src/main/generated-flex -include-namespaces

Screen Shot 2015-12-16 at 9.01.55 AM.png

I was actually getting a similar problem for our own resources files and I "fixed" it by marking the "locale" folder under as a src root. Didn't seem right but it got me past the compiler error. Hopefully I'm just incorrectly telling it how to find the locales.

Screen Shot 2015-12-16 at 9.05.16 AM.png

The .flexConfig file contains the following:

<?xml version="1.0"?>
<flex-config xmlns="">

Comment actions Permalink


Do you really have to work with that ancient SDK? I do not have it in hands to play with. May be the problem will go away if you switch to more recent SDK.
Try to create a brand new project that has a single Flash build configuration of Library (SWC) type and contains the only one source file that contains 'ResourceManager.getInstance().getString("SharedResources", "dateFormat")'. Will it compile?

Meanwhile I have one more idea how to fix your compileation problem. Open Dependencies tab and click [+] -> New Library -> Select path to [Flex SDK]/frameworks/locale/en_US

I was actually getting a similar problem for our own resources files and I "fixed" it by marking the "locale" folder under as a src root.

This is a right way to go. Well, the most straight forward way is that:
- you mark all subfolders of your locals folder as a source root
- you list all locales in Compiler Options tab
- you do not specify locales and source paths anywhere else, including Additional Compiler Options or Additional Compiler Configuration file

Specifying Additional Compiler Options and Additional Compiler Configuration file usually works well. But this way it is possible to set the same compiler option in 3 ways: un IDE UI, as additional options, inside additional compiler options file. In some cases if the same option is set in different ways it may lead to a conflict with unexpected result.
Comment actions Permalink

Do I have to use the ancient SDK? I'm not 100% sure, I know that it wasn't part of the plan to upgrade the SDK. The codebase is really big and we are writing an HTML replacement app for it, I'm already getting grief for trying to switch to IntelliJ. We'd have to make sure it would still work well under Adobe Flash Builder and Maven, it may be worth a try but that didn't help with finding the SharedResources file.

However, adding a dependency to "framework_rb.swc" did fix my problem. I'm hoping we only have one problem left before we can move to IntelliJ and I'll ask about it in a separate question so that it can be more helpful to other forum users.

Screen Shot 2015-12-16 at 10.17.42 AM.png

Thanks a lot,

--Juan Mendes


Please sign in to leave a comment.