Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash with compile sdk version #61

Open
panospyrakis opened this issue May 14, 2018 · 6 comments
Open

crash with compile sdk version #61

panospyrakis opened this issue May 14, 2018 · 6 comments

Comments

@panospyrakis
Copy link

I get this crash when i updated compile sdk version.

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.ViewDragHelper.processTouchEvent(android.view.MotionEvent)' on a null object reference
        at com.mahc.custombottomsheetbehavior.BottomSheetBehaviorGoogleMapsLike.onTouchEvent(BottomSheetBehaviorGoogleMapsLike.java:288)
        at android.support.design.widget.CoordinatorLayout.resetTouchBehaviors(CoordinatorLayout.java:396)
        at android.support.design.widget.CoordinatorLayout.onAttachedToWindow(CoordinatorLayout.java:238)
        at android.view.View.dispatchAttachedToWindow(View.java:16718)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3151)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3158)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3158)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3158)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3158)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3158)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1823)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1537)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:959)
        at android.view.Choreographer.doCallbacks(Choreographer.java:734)
        at android.view.Choreographer.doFrame(Choreographer.java:670)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:945)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6776)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
@NagyGyorgyKristof
Copy link

i have the same problem how do I solve it ? which compile version is supported?

@insacc
Copy link
Contributor

insacc commented Jun 6, 2018

Adding
if (mViewDragHelper == null) { mViewDragHelper = ViewDragHelper.create(parent, mDragCallback); }

before to the call on the onTouchEvent() would be the workaround for now.

mViewDragHelper.processTouchEvent( event );

@mrmosi13
Copy link

can you upload "BottomSheetBehaviorGoogleMapsLike.java" file ? i put this code in line 274 but nothing change !!
i really confused :(
can you guide me ? please

thanks really

@miguelhincapie
Copy link
Owner

Hi @mrmosi13,

I'm sorry but I really don't understand what are you talking about. Can you give me more details please?
A list of things, let me know if this can help you:

  1. I thought I had uploaded last merge code in bintray, am I wrong?
  2. Do you import the library using gradle? Instruction about how to do it are in readme file or main page of this project.
  3. this issue was about an error compiling after switch sdk version, I mean the library was working fine in previous sdk versions but when you upgraded it, it was crashing, do you have same problem?

@mamomia
Copy link

mamomia commented Sep 3, 2018

im having this same issue, any solution?

@insacc
Copy link
Contributor

insacc commented Jan 26, 2019

@mamomia it should be fixed with the latest version, are you using the latest one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants