92

I've got a real doozy here. When I click on spinners, open menu items, or open context menus on long-clicks I get the same Logcat message:

08-02 21:20:57.264: E/ViewRootImpl(31835): sendUserActionEvent() mView == null

The tag is ViewRootImpl, and the message is sendUserActionEvent() mView == null. I could not find anything helpful about this on the web. I searched through the Android sources and found some references to mView, but I could not find the file in which this log message is printed. For reference, I'm using a Samsung Galaxy S4 running 4.2.2, or API 17. The same message does NOT occur when debugging on a Nexus 7 running Android 4.3. Any ideas? Is this a Samsung-specific issue?

crocboy
  • 2,887
  • 2
  • 22
  • 25
  • Possible duplicate of [sendUserActionEvent() mView== null after clicking on button](http://stackoverflow.com/questions/20160737/senduseractionevent-mview-null-after-clicking-on-button) – akshay Oct 21 '16 at 11:16
  • Check my answer for the same problem, it might fix your code http://stackoverflow.com/questions/23016155/senduseractionevent-mview-null-on-samsung-tab3/40619021#40619021 – A.J Nov 15 '16 at 20:30

6 Answers6

95

I also encuntered the same in S4. I've tested the app in Galaxy Grand , HTC , Sony Experia but got only in s4. You can ignore it as its not related to your app.

App Work
  • 21,899
  • 5
  • 25
  • 38
  • Do you have any more information on it, or do you know why it happens? – crocboy Aug 14 '13 at 13:27
  • This will occur if your wifi is disabled while testing. Turn on WI-FI and this error will vanish. I suspect s4 sends some user event for its future research on user actions. – App Work Aug 14 '13 at 13:41
  • 2
    Are u connected to internet while your wi-fi is turned on? This will appear if there is no connectivity to the internet. – App Work Aug 15 '13 at 07:07
  • By Wi-Fi On , I meant the internet connectivity to be turned on, Sorry . – App Work Aug 15 '13 at 10:48
  • 35
    The WIFI / connection theory is wrong. Both are working for me, but I still get this error (on S4). – radley Sep 27 '13 at 20:07
  • @yahska yeah, I am also facing the same issue, anyway did you solved that issue.... – kumar Sudheer Nov 27 '13 at 07:31
  • 2
    The above Logcat message is sometimes preceeded by another more informative message: "Attempted to finish an input event but the input event receiver has already been disposed" – Hartmut Pfitzinger Mar 05 '14 at 18:36
  • Also getting this on the S3 – Chris Nevill Aug 23 '14 at 19:14
  • i get the same using AlertDialog and setSingleChoiceItems in Galaxy Grand, something go wrong after many cancel shows! – Smile2Life Dec 23 '14 at 12:24
  • 1
    I think this error is related to a new version off android on a device, I have this problem on Note 3 having version 5.0 while I don't have any problem with Note 3 with 4.4.2 version.. + I think this is related to a Dialog, because it happened when a popup dialog should appear to enter Bluetooth password. – Chris Sim Apr 21 '15 at 09:33
  • Also get this on the Samsung Xcover3 (Android 4.4.4). – Joze Aug 13 '15 at 07:50
  • Also applies to Samsung Galaxy S5 with Android 5.0. – gaborsch Sep 15 '15 at 20:55
  • This happened to me using Galaxy Note 5. Android sucks! – Neon Warge Jul 24 '16 at 08:55
  • can some one help me in this problem ??! – Amal Kronz Sep 24 '16 at 13:10
  • @ChrisSim this error also only occurs for me when a dialog box pops up to receive a Bluetooth connection. Did you ever find a solution? – markos14 Jan 28 '19 at 14:25
  • This is not an answer. This bug happens on many Samsung devices, though there seems to be nothing wrong with the app you should support all Samsung devices. – Hadas Aug 21 '19 at 11:38
5

I solved this problem on my Galaxy S4 phone by replacing context.startActivity(addAccountIntent); with startActivity(new Intent(Settings.ACTION_ADD_ACCOUNT));

droid-zilla
  • 536
  • 7
  • 8
  • 4
    Correct. This is what really solved the same problem, in the same API, for me. It's unnecessary calls context.startActivity() if you already IS in the context you want. Just calling startActivity() is sufficient plus not results on that error. Thank you everyone. – Shad Aug 25 '14 at 18:43
  • Would you please provide an example code to help with this? Thank you. – Brandon Feb 14 '15 at 21:29
  • 1
    Intent addAccountIntent = new Intent(Settings.ACTION_ADD_ACCOUNT); addAccountIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); addAccountIntent.putExtra(Settings.EXTRA_AUTHORITIES, new String[]{"com.app.yourapp"}); startActivity(addAccountIntent); – droid-zilla Feb 15 '15 at 01:19
  • 1
    @AmitSinha on your activity/fragment. The part in your code where you will launch another activity. – Neon Warge Jul 24 '16 at 08:59
0

Same issue on a Galaxy Tab and on a Xperia S, after uninstall and install again it seems that disappear.

The code that suddenly appear to raise this problem is this:

public void unlockMainActivity() {
    SharedPreferences prefs = getSharedPreferences("CALCULATOR_PREFS", 0);
    boolean hasCode = prefs.getBoolean("HAS_CODE", false);
    Context context = this.getApplicationContext();
    Intent intent = null;

    if (!hasCode) {
        intent = new Intent(context, WellcomeActivity.class);
    } else {
        intent = new Intent(context, CalculatingActivity.class);
    }
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    (context).startActivity(intent);
}
BuguiBu
  • 1,507
  • 1
  • 13
  • 18
0

Even i face similar problem after I did some modification in code related to Cursor.

public boolean onContextItemSelected(MenuItem item) 
{
        AdapterContextMenuInfo info = (AdapterContextMenuInfo)item.getMenuInfo();
        Cursor c = (Cursor)adapter.getItem(info.position);
        long id = c.getLong(...);
        String tempCity = c.getString(...);
            //c.close();
...
}

After i commented out //c.close(); It is working fine. Try out at your end and update Initial setup is as... I have a list view in Fragment, and trying to delete and item from list via contextMenu.

Manjul
  • 11
0

This has to do with having two buttons with the same ID in two different Activities, sometimes Android Studio can't find, You just have to give your button a new ID and re Build the Project

0

It is an error on all Samsung devices, the solution is: put this line in your activity declaration in Manifest.

android:configChanges="orientation|screenSize"

also when you start the activity you should do this:

Intent intent = new Intent(CurrentActivity.this, NextActivity.class);
intent.setType(Settings.ACTION_SYNC_SETTINGS);
CurrentActivity.this.startActivity(intent);
finish();

I used this to make an activity as fullscreen mode, but this question does not need the fullscreen code, but in all cases might someone need it you can refer to this question for the rest of the code:

How to make VideoView full screen

Kym NT
  • 670
  • 9
  • 28