9

I am new to the android development and when i create a new project using eclipse juno on mac OSx i got an error at runtime Failed to instantiate com.android.menubar.internal.MenuBarEnhancerCocoa

And yes on the layout file it also says- The project target(Android 4.1) is not properly loaded.

Anyone please help me how to get out of this. Thanks in advance..

And yes everything was setup properly SDK and all, because this whole setup is running properly on one of the other system.

3 Answers 3

5

I had the same problem but managed to resolve it. com.android.menubar.internal.MenuBarEnhancerCocoa - was not in the SDK that was linked to Eclipse install (I have multiple for various reasons - e.g. AppEngine not supported in latest Eclipse). There were a number of steps I had to do to resolve this (so any one of them may be the actual fix or a combination may resolve the problem). Here's a checklist :

  1. If you have installed Eclipse - click the Android SDK manager icon. Ensure it is pointing to the latest Android SDK (R20 as of writing)
  2. As it's a new Eclipse+SDK - add the build targets by selecting from the list of targets that appear in the SDK manager. Also add Android support tools
  3. Restart Eclipse. When asked about he workspace - create a new one. I thought some of my problems would be linked to old projects.
  4. The problems should have gone away. One final thing is, once you create a project - check your certificates have not expired. There's another thread on updating the debug certificate (Delete your keystore located in ~/.android/debug.keystore then restart Eclipse.)
  5. Create a new AVD target.

Hope those things help.

0

It appears to me the com.android.menubar.internal.MenuBarEnhancerCocoa is only there to make the android app feel nicer if it's run directly. Then preferences and about will be in the application menu. If you run the android sdk manager from eclipse, then eclipse will take over that part of the application menu.

0

Although it doesn't sort out the issue it may be useful anyway. There's the web page with the sources MenuBarEnhancer where there's the call to instantiate the com.android.menubar.internal.MenuBarEnhancerCocoa class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.