question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I used the suggested code to fix the ViewGroup error in my project by creating a class with this code:

`import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.mxn.soul.flowingdrawer_core.LeftDrawerLayout;

/**
 * Created by user on 2016-06-28.
 */
public class HackyProblematicViewGroup extends LeftDrawerLayout {

    public HackyProblematicViewGroup(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        try {
            return super.onInterceptTouchEvent(ev);
        } catch (IllegalArgumentException e) {
            //uncomment if you really want to see these errors
            //e.printStackTrace();
            return false;
        }
    }
}`

but when i zoom out of my ImageView my app still crashes and i get this error message:

`06-28 13:50:38.663 356-356/com.wilsapp.wilsapp E/ViewDragHelper: Ignoring pointerId=1     because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
06-28 13:50:38.676 356-356/com.wilsapp.wilsapp E/InputEventReceiver: Exception dispatching input event.
06-28 13:50:38.682 356-356/com.wilsapp.wilsapp D/AndroidRuntime: Shutting down VM
06-28 13:50:38.707 356-356/com.wilsapp.wilsapp E/AndroidRuntime: FATAL EXCEPTION: main
                                                             Process: com.wilsapp.wilsapp, PID: 356
                                                             java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
                                                                 at android.support.v4.widget.ViewDragHelper.saveLastMotion(ViewDragHelper.java:849)
                                                                 at android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:1057)
                                                                 at com.mxn.soul.flowingdrawer_core.LeftDrawerLayout.onInterceptTouchEvent(LeftDrawerLayout.java:212)
                                                                 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2108)
                                                                 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                 at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403)
                                                                 at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737)
                                                                 at android.app.Activity.dispatchTouchEvent(Activity.java:2771)
                                                                 at com.wilsapp.wilsapp.Buyer_Home_Page.dispatchTouchEvent(Buyer_Home_Page.java:411)
                                                                 at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
                                                                 at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
                                                                 at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364)
                                                                 at android.view.View.dispatchPointerEvent(View.java:9520)
                                                                 at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230)
                                                                 at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096)
                                                                 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                 at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
                                                                 at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
                                                                 at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787)
                                                                 at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
                                                                 at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844)
                                                                 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                 at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
                                                                 at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
                                                                 at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
                                                                 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                 at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922)
                                                                 at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)
                                                                 at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5857)
                                                                 at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6025)
                                                                 at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
                                                                 at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
                                                                 at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
                                                                 at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:5996)
                                                                 at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6048)
                                                                 at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
                                                                 at android.view.Choreographer.doCallbacks(Choreographer.java:670)
                                                                 at android.view.Choreographer.doFrame(Choreographer.java:600)
                                                                 at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
                                                                 at android.os.Handler.handleCallback(Handler.java:739)
                                                                 at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                at android.os.Looper.loop(Lo`

It also says that HackyProblematicViewGroup is not in use but I don’t know if that’s the problem or not

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Jawnnypoocommented, Jun 30, 2016

Glad to hear it!

0reactions
lazar108commented, Jun 30, 2016

This worked and I added a new class to fix a different ViewGroup class error. Thanks for the help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error inflating class android.view.ViewGroup - Stack Overflow
ViewGroup is an abstract class. Use another layout as RelativeLayout or LinearLayout. In LogCat you have: E/AndroidRuntime(12286): Caused ...
Read more >
ViewGroup - Android Developers
A ViewGroup is a special view that can contain other views (called children.) The view group is the base class for layouts and...
Read more >
ViewGroup error · Issue #382 · Baseflow/PhotoView - GitHub
I used the suggested code to fix the ViewGroup error in my project by creating a class with this code: `import android.content.
Read more >
Crash inside ViewDragHelper, DrawerLayout from support v4 ...
Occurred during monkey-test. Hard to explain what really happend, but I have a stack trace: Device: Samsung GT-I9300 Android: 4.3 (original firmware)
Read more >
Bug - Android crash on Unity 2019.4.26f
view.ViewGroup.addView(ViewGroup.java:4390). at com.unity3d.player.j.a(). at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found