I tried to implement a DragListener to my Fragment, but the app crashed and give me a NoClassDefFoundError on this line:
findViewById(R.id.my_tab_fragment).setOnDragListener(new MyDragListener());
this is my snippet:
public class MainFragmentActivity extends FragmentActivity {
    @Override    
    protected void onCreate(Bundle bundle) {   
        WWHApplication.getInstance().getJsonDBInstance();
        WWHApplication.checkDB();
        super.onCreate(bundle);
        setContentView(R.layout.main_fragment_activity_drag);
        findViewById(R.id.my_tab_fragment).setOnDragListener(new MyDragListener());
            }
            class MyDragListener implements OnDragListener {
                //Drawable enterShape = getResources().getDrawable(
                    //  R.drawable.shape_droptarget);
                //Drawable normalShape = getResources().getDrawable(R.drawable.shape);
                @Override
                public boolean onDrag(View v, DragEvent event) {
                    switch (event.getAction()) {
                    case DragEvent.ACTION_DRAG_STARTED:
                        // Do nothing
                        break;
                    case DragEvent.ACTION_DRAG_ENTERED:
                        //v.setBackgroundDrawable(enterShape);
                        break;
                    case DragEvent.ACTION_DRAG_EXITED:
                        //v.setBackgroundDrawable(normalShape);
                        break;
                    case DragEvent.ACTION_DROP:
                        // Dropped, reassign View to ViewGroup
                        //View view = (View) event.getLocalState();
                        //ViewGroup owner = (ViewGroup) view.getParent();
                        //owner.removeView(view);
                        //LinearLayout container = (LinearLayout) v;
                        //container.addView(view);
                        //view.setVisibility(View.VISIBLE);
                        break;
                    case DragEvent.ACTION_DRAG_ENDED:
                        //v.setBackgroundDrawable(normalShape);
                    default:
                        break;
                    }
                    return true;
                }
            }
    }
What do I need to do to fix the error? Thanks