Unexpected value from nativeGetEnabledTags: 0
Asked Answered
H

8

303

I installed the latest version of the SDK (r21) and ADT 21.0.0. I tried simple code, and it works well, but now I get a warning in LogCat that did not appear in the previous versions:

Unexpected value from nativeGetEnabledTags: 0

I googled it, and I found Issue 39723: Emulator spams LogCat with "Unexpected value from nativeGetEnabledTags: 0" message.

What does it mean?

Haleakala answered 16/11, 2012 at 11:57 Comment(2)
it means there's a bug in the latest SDK. make sure and star the issue to vote for it getting fixed.Malady
I have the same problem, should I downgrade the application ?Umeko
T
477

I just ran into this problem, too. As a workaround I'm filtering the LogCat output with the following expression on the by Log Message field of the filter:

^(?!.*(nativeGetEnabledTags)).*$ 

Otherwise it is so spammed it's almost useless.

Following Laksh suggestion, if you want to filter this always without having to always write it on the Search for messages field:

  1. Goto your Logcat
  2. In the Saved Filters part on the left, click on the Edit selected logcat filter (If Saved Filters is not visible then click on Display Saved Filters View in the Logcat)
  3. There, in the by Log Message field, enter ^(?!.*(nativeGetEnabledTags)).*$.
Tracy answered 20/11, 2012 at 16:3 Comment(5)
will you please tell me how to write this in Log.Knickerbockers
Goto your Logcat, and in the Saved Filters part, click on Edit selected logcat filter. There in the by Log Message field enter ^(?!.*(nativeGetEnabledTags)).*$. If Saved Filters is not visible then click on Display saved filters view in the Logcat.Haleakala
This is a nice workaround for those of us using Intel images (as opposed to ARM, where this is supposed to be fixed)Joseph
I'm still learning regular expressions, and I'm a bit confused by this. I understand the components (start of line, negative look-ahead, any characters, string literal, any characters, end of line), but I don't understand why some of it is necessary. Doesn't a regex return any line that contains a match, so why do we need ^, .*, and $? Why not just (?!nativeGetEnabledTags)? (p.s. this doesn't work)Nakashima
Maybe you're thinking of grep which is nice and searches the line by default. The answer to: "Doesn't a regex return any line that contains a match..." is NO.Gurolinick
B
59

It's a bug in the emulator System Image for API 17.

At the moment, your workarounds are the following:

If you DON'T need API level 17

  • Use an emulator with API 16 (or lower)...
  • ...or higher (API 19 for instance, tested to solve the problem too).

If you DO need API level 17

  • Use a real device: Nexus 4, Nexus 7, Nexus 10.
  • Use the LogCat filter suggested by Hendrik. You'll have to edit every single filter you have, though (If you want to fix them all).
Blink answered 18/1, 2013 at 14:38 Comment(4)
I use Nexus 7 Real Device, but the bug still appears in Logcat... Hendrik's workaround is the best for time being..Haleakala
Same with a Nexus 4 and a Galaxy Nexus with 4.2.1. Though workaround is somewhat limited: other logs tend to disappear rather quickly.Dispense
It seems that those real devices also have the buggy system image. I guess that your only workaround in that case in the log filter.Gurnard
No needed it's lower. I had the same problem, I run an emulator running Android 4.4.2 API Level 19 and it also solved the problem.Figone
O
18

The link which you referred to has the answer. It is a bug introduced in the latest revision of the tools. In the followup comments you can read that a google representative says a fix is on the way.

Offload answered 18/11, 2012 at 12:9 Comment(0)
H
15

Update the ARM EABI v7a System Image from Android SDK Manager and the warning wont be seen any more .. !! :)

Yes. This works only for ARM EABI System Image and not for Intel image.

Update

Seems like there is a Update available for the Intel x86 Atom System Image for API 18 which fixes the issue (I have not tried it though). A link to manually install the system image. Ofcourse its also available in Android SDK Manager.

But its only for Android 4.3. The 4.2.x developers might still have to wait for a fix..!

Haleakala answered 4/3, 2013 at 11:41 Comment(8)
Has no effect, don't botherScrogan
It has a effect! After the System Image Update, the bug is not seen. If there's no effect in your case, then also try updating your adt plugin and android sdk.Haleakala
No - I have latest versions of everything, and rebooted the machine, and the bug is still there.Scrogan
I still see this in the intel image myself.Ohl
Updating the ARM EABI m7a System Image worked for me. Thank you!Iquique
I think it works for some and for some it doesn't.. It worked for me too..!! And I also tried the system image update on 3 other android installed systems, and it worked for all of them..!!Haleakala
Reproduced the same issue on Intel Atom(X86) Image API 17, 4.2.2 ADT version 21.1.0.v201302060044-569685. Everything should be latest.Ondometer
This is not a solution for Intel image. ARM EABI is not for Intel, obviously.Madgemadhouse
I
5

The problem with Intel x86 Atom images and "nativeGetEnabledTags: 0" is fixed with the release of the Android 4.3 (API 18) Intel x86 Atom image. I just tested it and can confirm that.

With ARM images this was fixed some time ago, I know ...

Iodize answered 27/8, 2013 at 12:38 Comment(0)
H
4

Since these mesasages are tagged with the Trace tag, you can use simpler expression to filter them by Log Tag field:

^(?!Trace)

That's it.

Btw, I also see these messages on the real device (Fly IQ4410).

However answered 8/10, 2013 at 22:40 Comment(0)
F
4

I was getting lots of similar messages, so I needed better filters. Add these filters to the LogCat:

By log tag:

^(?!.*(GN_FW_TextView|GN_FW_Editor|SurfaceTextureClient|skia|AbsListView|Provider/Settings|InputMethodManager|jdwp)).*$

By log message:

^(?!.*(nativeGetEnabledTags)).*$
Fifteenth answered 11/2, 2014 at 12:28 Comment(0)
S
1

I have added the ^(?!.*(nativeGetEnabledTags)).*$ filter, but you can see how few it helps me:

enter image description here

from 1157 is filtered a few and 799 bypassed same ratio, but a bit bigger numbers:

enter image description here

I needed to add the "SpamFilter" to be able to use the Logcat:

enter image description here

by Log Tag:

 ^(?!Trace|ADB_SERVICES|BufferQueue|wpa_supplican|SurfaceFlinger|Settings/BW|Bluetooth HS/HF)

by Application Name:

^(?!com.android.systemui|system_process)

For me it made a bit usable the Logcat.

Simonesimoneau answered 16/10, 2013 at 20:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.