Failed to instantiate com.android.menubar.internal.MenuBarEnhancerCocoa - android

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.

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 :
If you have installed Eclipse - click the Android SDK manager icon. Ensure it is pointing to the latest Android SDK (R20 as of writing)
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
Restart Eclipse. When asked about he workspace - create a new one. I thought some of my problems would be linked to old projects.
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.)
Create a new AVD target.
Hope those things help.

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.

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.

Related

Android ADT is not recognized in Eclipse Neon.2

I have downloaded ADT Plugin for Eclipse. I don't see Android anywhere either when creating a new project, Preferences or "Customize perspective"
I have searched for the answer but I couldn't find it. The only thing that I didn't try is opening "command group availability" tab mentioned in forum not showing Android And AVD manager in eclipse because I can't see it at my setup.
I'm using Eclipse Neon.2 with JDK jdk1.8.0_121. I didn't add a PATH variable in my system. Not sure if I have to or not.
Android ADT doesn't seem to work for me in Neon too (same errors and long time search on startup without results)
There is a new Eclipse Android dedicated IDE now at https://eclipse.org/downloads/packages/eclipse-android-developers-includes-incubating-components/neon2 Must be installed in a separate folder with separate workspace (and renamed if needed) and all existing Android projects can be moved there. Afterwards i uninstalled ADT from the original Eclipse folder.
There is Installation Instructions for Google Plugin for Eclipse 4.6 (Neon)
https://developers.google.com/eclipse/docs/install-eclipse-4.6
It appears that either Eclipse Neon.2 stopped supporting ADT or that it has issues with it. I went back to Eclipse Neon.1 and I can find Android references all over, so I think the issue is something to do with Eclipse Neon.2.
Thanks to all of you who tried to help.
UPDATE:
It appears that for Neon.2 there is a separate package for Android that you can find here:
http://www.eclipse.org/downloads/packages/eclipse-android-developers-includes-incubating-components/neon2

Starting Android Learning

Recently i've started android training, and i've got the below 2 issues.
In my desktop i already had eclipse installed, and when trying to import the android plugins, I was getting some error, so what i did was downloaded eclipse+android package from android developers website and I copied it onto my programs files folder where java is installed and when i open it, it is throwing me an error saying the javaw is not found, goinf through the earlier posts on SO website, i've tried the below.
-vm
\adding the java path
But this didn't work for me. so what i did was installed the same package in my laptop(there is no another eclipse on my laptop). and it started working fine.
On my laptop in the eclipse+android package i write a program and when i hit the Android virtual device manager, it asks me to create a AVD, and when i've filled the entire data here, the OK button is still greyed out. Below is the screenshot.
Also i've tried to create by creating from Device definition,even here i'm not getting the ok button hoghlighted and below is its screenshot
please let me know how can i fix the above issues.
Thanks
Firstly you need not wonder for such a mess ..
For IDE purpose .. go to this link .. https://developer.android.com/sdk/installing/studio.html
Android Studio IDE contains all you need .. Just download ..extract and start creating your first Android project.
And now for tutorials to learn .. try these site ..
(1) https://buckysroom.org/videos.php?cat=6 ( Travis ... provide best tutorial in this world )
(2) https://developer.android.com/index.html
Now you are good to go ..
You can see it clearly says: "CPU/ABI: No system images installed for this target"
So either:
Lower your target.
Update your SDK.
Then set a CPU and you can go on in the AVD creation process.
update the sdk, install ARM/intel(x86) for CPU/ABI
Try using Android Studio by IntelliJ ,as it is for more better than eclipse and moreover ADT plugin for Eclipse is no longer in active development.
if you then also get the same error again try this link android Developer and setup java environment.

Eclipse android not creating activity

I've just tried to get into Android development, but somehow I can't get my project working properly. I followed the "Getting Started" guide (http://developer.android.com/training/basics/firstapp/creating-project.html), but I'm stuck on building my project.
Everything is going fine but the creation of my MainActivity. I've left all the settings regarding the activity to default. Somehow when I create my project, there's no activity definition in the AndroidManifest.xml.
I've two potential solutions, but none of them seem to work. The mainly suggested workaround is to update the ADT Plugins through the correct repository (Eclipse android project not creating blank activity). However in my situation the updater states that I've already got these packages installed.
The other possible solution was to remove the support library from the SDK manager. After that, trying to create a new project in Eclipse should prompt me to install this package. Somehow I don't seem to get this prompt. (https://stackoverflow.com/a/11260656/3786210).
Are there any other possible solutions I could try out to get my project correctly built? Thanks in advance!
Additional information:
Windows 8 (64 bit)
ADT packages version: 23.0.0.1245622
Target SDK and Compile With: Android 4.4 (KitKat)
You should just yse IDEA instead of Eclipse
http://www.jetbrains.com/idea/download/
Eclipse sometimes can produce such problems

What can I do to fix a Android SDK Null Pointer Exception error?

I am having a problem creating my first Android App.
I installed JDK 7u21.
I downloaded and extracted Android SDK Build: v22.0.0-675183.
I started Eclipse and created a new Android Application Project.
When I click Finish I get the following error:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'Steve'.
java.lang.NullPointerException
I have search and couldn't find anyone with the same problem.
Did I install something wrong? Is something missing from the SDK? What can I do to correct this error?
In my case I switch from Android SDK 64 bits, to Android SDK 32 bits. Now it's working perfectly.
Have the same problem after updating SDK to 22. For me, it seems to be a backward compatibility fail by Android vs. Eclipse (on my side additional with Maven).
See also: Eclipse Upgrade Not Working
So not your fault. Try f.e. IntelliJ for the moment. There is also a specialised version, called Android Studio but this is not that stable as the original.
The Android guys also deliver a complete package for Eclipse + ADT-Plugin, but not sure, whether this solves the problem.
I've run into the same problem. Every new project, imported or otherwise throws that exception.
It appears to be a bug with Eclipse, and the simplest fix for me was to re-extract the ADT bundle, and replace only the eclipse directory. It'll take forever to download the SDKs if you replace the SDK directory too.
ADT bundle does not work with the Oracle Java 7 SE JDK, failing with an NPE in the Android Application Project wizard.
Installing the Eclipse Plugin
Here's a workaround that lets you keep Java 7 as the default but run ADT with Java 6 when you have both installed. Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor. Before the -vmargs line, insert these two lines:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
or any place your java is installed, for example on my computer:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
Android issue tracker - answer
This works for me:
For those who experience the same problem, here is how i fixed it: After a couple of try and errors, I found out the problem was about creating an activity in the create project wizard. If you simply deselect the create activity button at the 2nd step of the wizard, it creates the project succesfully. Then you can add an activity to your project easily.
Source:
https://code.google.com/p/android/issues/detail?id=68755

Cannot create new Android Projects in Eclipse

Using 3.6.2. When I choose to create a new Android Project, I enter a name, 'FirstProject' but the Finish button remains hollow and I cannot get past creating the project.
I did a little Google research and found a common cause of this is that the support folder that exists in the SDK's extras folder needs to be duplicated and the duplicate named to compatibility. I've done this now, and restarted Eclipse, but this still hasn't fixed the issue.
I also read that Juno causes this problem, but I'm not using Juno.
Has anyone experienced this problem before? Very eager to start an Android App!!
EDIT: A screen of the error:
You need to choose a Build SDK. If there is nothing in that drop-down, please visit the SDK Manager (Window > Android SDK Manager) and download one or more SDK platforms and associated emulators.
Make sure you add the SDK in Eclipse otherwise you will download them all and scratch your head on why they are not working.If you launch SDK manager form SDK folder and not from Eclipse it does not seem to register in Eclipse that you have downloaded these files. Took me several hours for something that should have taken only one or so.

Categories

Resources