android.annotation无法解决 [英] android.annotation cannot be resolved

查看:134
本文介绍了android.annotation无法解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  import android.annotation我试图在eclipse中运行一个Android代码示例。 SuppressLint; 

我不断收到与此行有关的错误,如:

 导入android.annotation无法解析

如果有人可以帮助我,我会很感激。

解决方案

你的项目中有哪些API?

因为



android.annotation.SuppressLint - 这是因为在API级别16中添加



http://developer.android.com/reference/android/注释/ SuppressLint.html



您需要下一步执行



您可以点击鼠标点击 - >属性并检查下一张图片为您选择API级别的项目构建目标> = 16




I'm trying to run a sample android code in eclipse, but when I try:

import android.annotation.SuppressLint;

I keep getting an error related to this line like:

the import android.annotation cannot be resolved

I will appreciate if someone can help me with this.

解决方案

Wich API do you Refered in your project.

Because

android.annotation.SuppressLint - it's since Added in API level 16

http://developer.android.com/reference/android/annotation/SuppressLint.html

You need do next

You project rigth mouse click->Properties and check next picture for you select Project Build Target for API Level >=16

这篇关于android.annotation无法解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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