来自nativeGetEnabledTags的意外值:0

本文翻译自:Unexpected value from nativeGetEnabledTags: 0

I installed the latest version of the SDK (r21) and ADT 21.0.0. 我安装了最新版本的SDK(r21)和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: 我尝试了简单的代码,它运行良好,但现在我在LogCat中收到一个警告,该警告没有出现在以前的版本中:

Unexpected value from nativeGetEnabledTags: 0 来自nativeGetEnabledTags的意外值:0

I googled it, and I found Issue 39723: Emulator spams LogCat with "Unexpected value from nativeGetEnabledTags: 0" message . 我用Google搜索了,我发现了问题39723:Emulator使用“来自nativeGetEnabledTags:0的意外值”消息阻止LogCat

What does it mean? 这是什么意思?


#1楼

参考:https://stackoom.com/question/uI9O/来自nativeGetEnabledTags的意外值


#2楼

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. 在后续评论中,您可以阅读谷歌代表说修复工作正在进行中。


#3楼

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: 作为一种解决方法,我在过滤器的“ by Log Message字段中使用以下表达式过滤LogCat输出:

^(?!.*(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: 根据Laksh建议,如果您想要过滤此内容,而无需始终将其写在“ Search for messages字段中:

  1. Goto your Logcat 转到你的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) 在左侧的Saved Filters部分中,单击Edit selected logcat filter (如果看不到Saved Filters,则单击Logcat中的Display Saved Filters View)
  3. There, in the by Log Message field, enter ^(?!.*(nativeGetEnabledTags)).*$ . 在“日志消息”字段中,输入^(?!.*(nativeGetEnabledTags)).*$

#4楼

It's a bug in the emulator System Image for API 17. 这是API 17的仿真器System Image中的一个错误。

At the moment, your workarounds are the following: 目前,您的解决方法如下:

If you DON'T need API level 17 如果您不需要API级别17

  • Use an emulator with API 16 (or lower)... 使用API​​ 16(或更低版本)的仿真器......
  • ...or higher (API 19 for instance, tested to solve the problem too). ...或更高(例如,API 19,经过测试以解决问题)。

If you DO need API level 17 如果你需要API级别17

  • Use a real device: Nexus 4, Nexus 7, Nexus 10. 使用真实设备:Nexus 4,Nexus 7,Nexus 10。
  • Use the LogCat filter suggested by Hendrik. 使用Hendrik建议的LogCat过滤器。 You'll have to edit every single filter you have, though (If you want to fix them all). 但是,您必须编辑您拥有的每个过滤器(如果您想要全部修复它们)。

#5楼

Update the ARM EABI v7a System Image from Android SDK Manager and the warning wont be seen any more .. !! Android SDK Manager更新ARM EABI v7a System Image ,警告将不再被看到.. !! :) :)

Yes. 是。 This works only for ARM EABI System Image and not for Intel image. 这仅适用于ARM EABI System Image,而不适用于Intel映像。

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). 似乎有一个更新可用于API 18Intel x86 Atom System Image ,它修复了这个问题(尽管我还没试过)。 A link to manually install the system image. 手动安装系统映像的link Ofcourse its also available in Android SDK Manager. 当然它也可以在Android SDK Manager中使用。

But its only for Android 4.3. 但它仅适用于Android 4.3。 The 4.2.x developers might still have to wait for a fix..! 4.2.x开发人员可能仍然需要等待修复..!


#6楼

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. 随着Android 4.3(API 18)Intel x86 Atom映像的发布,解决了Intel x86 Atom映像和“nativeGetEnabledTags:0”的问题。 I just tested it and can confirm that. 我只是测试了它并且可以确认。

With ARM images this was fixed some time ago, I know ... 使用ARM图像这已经修复了一段时间,我知道......

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值