Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:59:33+00:00 2026-06-06T18:59:33+00:00

I am following a step by step guide to mastering drag and drop and

  • 0

I am following a step by step guide to mastering drag and drop and am frustrated that step 1 is giving me an error. I am getting a NoClassDefFoundError. Can anyone see what I am doing wrong.

It is really annoying that I copied the guys code exactly and it doesn’t work.

I put a star on the line that it is crashing on. The one that defines clipdata.

07-01 14:37:47.544: E/AndroidRuntime(17055): FATAL EXCEPTION: main
07-01 14:37:47.544: E/AndroidRuntime(17055):
java.lang.NoClassDefFoundError: android.content.ClipData 07-01
14:37:47.544: E/AndroidRuntime(17055): at
com.codelikely.tester.TestApplicationActivity.onTouch(TestApplicationActivity.java:29)
07-01 14:37:47.544: E/AndroidRuntime(17055): at
android.view.View.dispatchTouchEvent(View.java:4020) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1746)
07-01 14:37:47.544: E/AndroidRuntime(17055): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1152)
07-01 14:37:47.544: E/AndroidRuntime(17055): at
android.app.Activity.dispatchTouchEvent(Activity.java:2102) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1730)
07-01 14:37:47.544: E/AndroidRuntime(17055): at
android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2268) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1921) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
android.os.Handler.dispatchMessage(Handler.java:99) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
android.os.Looper.loop(Looper.java:130) 07-01 14:37:47.544:
E/AndroidRuntime(17055): at
android.app.ActivityThread.main(ActivityThread.java:3691) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
java.lang.reflect.Method.invokeNative(Native Method) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
java.lang.reflect.Method.invoke(Method.java:507) 07-01 14:37:47.544:
E/AndroidRuntime(17055): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
07-01 14:37:47.544: E/AndroidRuntime(17055): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665) 07-01
14:37:47.544: E/AndroidRuntime(17055): at
dalvik.system.NativeStart.main(Native Method)

@Override
    public boolean onTouch(View view, MotionEvent motionEvent) {
        if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
            *ClipData clipData = ClipData.newPlainText("", "");*
            View.DragShadowBuilder dsb = new View.DragShadowBuilder(view);
            view.startDrag(clipData, dsb, view, 0);
            view.setVisibility(View.INVISIBLE);
            return true;
        } else {
            return false;
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:59:34+00:00Added an answer on June 6, 2026 at 6:59 pm

    Your app cannot find the ClipData class. ClipDate is only available from API level 11 and above. You’re running on 2.3, which is API level 9. As you are building against a higher API, you will not get an error at compile time. To make sure you aren’t using any other classes added later on, try setting your project to build with 2.3, or whatever OS is your minimum target.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following step: Then I should see an error message with identical
I'm following the step by step guide here and I hit an error at
I am following this guide On step 2 the clone/checkout just stops with no
I am following this guide to installing and using MSpec, but at the step
I'm using the following step by step guide to connect to Facebook Connect: http://msdn.microsoft.com/en-us/windows/ee702803.aspx
I am following a step by step guide on W3schools website on how to
For strongly-typed & type-safe solution, I have to do the following step. Create some
If I step through the following code the call to ReturnOne() is skipped. static
I am using the following plugin: http://codecanyon.net/item/dynamic-step-process-panels/118950 and I am trying to modify its
I have got a the following problem: I have got multi-step form where in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.