I am trying to create a popup menu and I keep getting java.lang.NoClassDefFoundError: android.widget.PopupMenu
public void showPopup(View v) { PopupMenu popup = new PopupMenu(this, v); MenuInflater inflater = popup.getMenuInflater(); inflater.inflate(R.menu.tweet_menu, popup.getMenu()); popup.show(); }
I understand that this error means that the class was found in the classpath at compilation, but not at runtime, but it's hard for me to understand why, since it is part of the Android SDK. I am using the latest version of the SDK and I am developing / compiling in Netbeans.
Please, help!
source share