ACTION_QUERY_PACKAGE_RESTART不能得到解决或不是字段 [英] ACTION_QUERY_PACKAGE_RESTART cannot be resolved or is not a field

查看:857
本文介绍了ACTION_QUERY_PACKAGE_RESTART不能得到解决或不是字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑以下无用code在Android活动:

Consider the following useless code in an Android activity:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    String s1 = Intent.ACTION_PACKAGE_CHANGED;
    String s2 = Intent.ACTION_QUERY_PACKAGE_RESTART;
}

为什么Eclipse中引发的 ACTION_QUERY_PACKAGE_RESTART不能得到解决或不是一个字段错误?我的意思是,不是由<定义的两个两个字符串href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/4.1.2_r1/android/content/Intent.java?av=f\"相对=nofollow> Intent类?

Why does Eclipse raise an ACTION_QUERY_PACKAGE_RESTART cannot be resolved or is not a field error? I mean, aren't both the two strings defined by the Intent class?

应用程序使用:

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="17" />

但把两个17不会改变Eclipse的行为。

but putting both to 17 doesn't change Eclipse behaviour.

推荐答案

这是从SDK隐藏,因为它只是为了在内部使用。这就是为什么它说:隐藏在它上面。 grep的code的格式,使这很难看到的。

It is hidden from the SDK because it is only meant to be used internally. That's why it says "Hide:" above it. The format of grepcode makes that hard to see.

这篇关于ACTION_QUERY_PACKAGE_RESTART不能得到解决或不是字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆