android - 为什么 eclipse 不提示这种已弃用的方法?

标签 android eclipse android-lint

在我的 manifest.xml 中我定义了:

    <uses-sdk android:minSdkVersion:"8" android:targetSdkVersion:"8" />

并且在 Android 的 View 类文档中说:

    setBackground(Drawable) 
    // ADDED IN API LEVEL 16

此方法已在 api 级别 16 中添加。但是当我在我的代码中使用它时,eclipse 不会发出任何投诉并且我的应用程序在运行 api 级别低于 16 的设备上崩溃。

我哪里错了?

最佳答案

您可能以版本 8 为目标,但使用 19 进行编译。

关于android - 为什么 eclipse 不提示这种已弃用的方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22466327/

相关文章:

android - 如何检测 Android Activity 何时开始和结束

android - 寻找具有多个 WebView 的 Android ViewFlipper 示例

android - lib模块和主模块之间如何通信

无法识别 Android Gingerbread 手机

由于 'A resource exists with a different case' 错误,Eclipse 项目未在 Mac 上构建

android - 升级到 gradle 插件 3.0 : Missing layout_width or layout_height attributes 时出现 Lint 错误

android - Lint 警告Android

java - 如何将HEX转换成两位数格式?

java - @IntDef注解和别人代码的返回值不能被注解或者如何暂时禁止注解影响代码?

eclipse - 使用Gradle buildship Eclipse插件找不到调试选项