Multi-OS Engine Actions context menu is always greyed out

Hi there!

I’m just starting to get my feet wet in using MOE. I’m following the tutorials in, but I can’t seem to generate bindings at all.

When I right click on the .h file in Android Studio, the MOE Actions context menu is greyed out. It’s also greyed out for any file that I right click on.

How do I generate bindings in this case?
I’m using version 1.3.0, compiled directly from git: b03ac33


This guid is for moe 1 and i think we have some change on 1.2.5
and on moe 1.3. (beta version) its changed every thing!

follow this link:

Yes the guide is old. But why is the context menu greyed out?

Also, the link you posted says: To create a new binding use the Multi-OS Engine Actions > Create New Binding action from the context menu

But my context menu is greyed out. How do I get it to be active?

I finally managed to figure out how to get the context menu to be active.

I successfully generated an AppViewController.
However, I can’t get it to generate it again after getting it to do it once, even though I’ve deleted the nbc file.

Is there any documentation on how to generate bindings?

1 Like

When you open the NBC file in your IDE, there should be an icon with a gear on it. Clicking on that should reveal the menu to launch the generation process.

Please make sure that you use the latest plugin version (beta-2).

Sorry for asking so many questsions. I’m still trying to feel my way around here.

1 - The plugin that I’m using has been compiled from the source repo. Is that newer than beta-2?

2 - After lots of trial and error, it seems that I need to have .nbc file in the ios module. However, if the file is inside that folder, I can’t test or generate any bindings.
Android Studio will have this error:

This is rather confusing for me, because I can run set up an iOS run configuration and it works fine.
Also, I have MOE_HOME set up in my .bash_profile, but I’m uncertain if it’s the right path. I have it set to ~/.moe/moe-sdk-1.3.0.
I’ve also used launchctl to setenv for MOE_HOME, but Android Studio is still reporting the same error.
How do I fix it?

Are you install moe sdk from repository ?

If you are using android studio you can add every things from plugin and most of the jobs will handled automatically!


No, it should be the same as beta 2 (you can check the moe-1.3.0-beta-2 tag in git).

Yes, the nbc file needs to be in the ios module. I created a GH issue, so we track this for documentation:

When you compile MOE from source, you still need to install the built SDK. There are multiple different options supported, and documented here. Which option are you trying to follow?

That said, the error message is a bit misleading, you should not need to set a MOE_HOME env var. This message refers to a very old version of MOE, I opened an issue to clean it up:

Best Regards,

Hi guys!

Thanks for all your responses! I’m not sure why the MOE_HOME error message is there, I’ve never used MOE before 1.3, so there shouldn’t be any old versions installed. I also tried to install the beta2 plugin from the JetBrains repository, same error :frowning:

When I had my nbc file in another directory (that’s not ios), generating bindings gives me this output in the console:

2017-03-07 21:19:14:201 -0500 [main] DEBUG - NatJGen started
2017-03-07 21:19:14:700 -0500 [main] DEBUG - Clang options: [-arch, arm64, -x, objective-c, -fmessage-length=133, -std=c99, -fobjc-arc, -fpascal-strings, -DNS_BLOCK_ASSERTIONS=1, -DOBJC_OLD_DISPATCH_PROTOTYPES=0, -isysroot, /Applications/, -miphoneos-version-min=9.0, -I/Users/angelystor/Documents/work/workspace/TestMOE/xxx, -I/var/folders/g5/996fl3qn1014hhscpxd5rpjh0000gn/T/NatJGen4279452866164214530, -iquote/Users/angelystor/Documents/work/workspace/TestMOE/xxx]
2017-03-07 21:19:15:311 -0500 [main] DEBUG - Indexing translation unit
2017-03-07 21:19:19:518 -0500 [main] DEBUG - Clang options: [-arch, armv7, -x, objective-c, -fmessage-length=133, -std=c99, -fobjc-arc, -fpascal-strings, -DNS_BLOCK_ASSERTIONS=1, -DOBJC_OLD_DISPATCH_PROTOTYPES=0, -isysroot, /Applications/, -miphoneos-version-min=9.0, -I/Users/angelystor/Documents/work/workspace/TestMOE/xxx, -I/var/folders/g5/996fl3qn1014hhscpxd5rpjh0000gn/T/NatJGen4279452866164214530, -iquote/Users/angelystor/Documents/work/workspace/TestMOE/xxx]
2017-03-07 21:19:19:998 -0500 [main] DEBUG - Indexing translation unit
2017-03-07 21:19:22:324 -0500 [main] DEBUG - c:@S@_CALayerIvars: Failed to merge secondary field types
2017-03-07 21:19:22:324 -0500 [main] DEBUG - c:@S@__darwin_arm_neon_state64: Failed to merge secondary field types
2017-03-07 21:19:22:325 -0500 [main] DEBUG - c:@S@arm_legacy_debug_state: Failed to merge secondary field types
2017-03-07 21:19:22:325 -0500 [main] DEBUG - c:@S@__darwin_arm_neon_state: Failed to merge secondary field types
2017-03-07 21:19:22:330 -0500 [main] DEBUG - Generating classes
2017-03-07 21:19:22:778 -0500 [main] DEBUG - NatJGen ended in 8.57713922s

But no files are output, which I guess it’s expected since the file is not in the ios directory.

However, once I put the nbc file in the ios directory, I get the no MOE_HOME var error, and a further error indicating that it failed to invoke java in directory ‘null/tools’
This is making me scratch my head a lot because MOE is working, I can compile and run an iOS project and my Java methods are being invoked. And trying to generate bindings while outside ios folder didn’t throw me any error… yet when the file is in its proper place, it doesn’t work :disappointed_relieved:

I installed the sdk into ~/.m2/repository//moe-sdk
And I also have it present in ~/.moe/moe-sdk
* (downloaded by the plugin I guess).
I’m not sure what option I’m trying to follow, since I’m really new to this plugin (was using RoboVM before). I basically just want to test how to generate bindings…

This is still weird, it looks like as if the IDE plugin could not determine the path of your SDK for some reason. This issue should go away in the next release, because then the editor will use Gradle in the background to generate the bindings.

Still, there might be a corner case that we don’t expect: can you provide us with a test project that we can use to reproduce this issue?

Here’s a link to the project. It was too big to upload to here.

This project has not special code nor settings though, it’s all just auto generated from Android Studio and MOE. I hope you can repro it, but I don’t think it’s likely…

I created a bindings.nbc file in ios. The contents aren’t correct, but it should be irrelevant since Android Studio could never invoke the tool required to generate the binding.

My AS version:
Android Studio 2.3
Build #AI-162.3764568, built on February 24, 2017
JRE: 1.8.0_112-release-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Thanks for looking into it!

Hi Angel,

I am experiencing the same problem with the context menu. It was working and now it is grey-out. Can you tell me, how did you fix the problem?

Hi @kisg
I am experiencing the same problem as Angel did, but when i click on the NBC file, the gear icon is also grey-out. Everything was working properly until a few days ago. I’m using the latest sdk and IntelliJ plugin.

The unofficial ItelliJ plugin 1.4.1-C by @Noisyfox fixed this!

Hi guys, I am having the same problem as angel. I am trying to follow the tutorial, but the Multi-OS Engine Actions context menu is always greyed out. I have tried the plugin suggested by dmm, but that also didn’t work. Also, my project doesn’t have any .nbc files whatsoever

… I am using the latest versions of AS and jdk, and downloaded the MOE plugin from the plugins section of settings in AS so I believe it’s the latest version