在Eclipse的意图不能被解析为一个类型“的错误 [英] 'Intent cannot be resolved to a type' error in eclipse
本文介绍了在Eclipse的意图不能被解析为一个类型“的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我编程的第一个安卓教程在eclipse中,并编写本code时:
I am programming the first android tutorial in eclipse, and when compiling this code:
Intent intent = getIntent();
它给人的错误
it gives the error
意图不能被解析为一个类型
Intent cannot be resolved to a type
如何解决呢?
推荐答案
也许,进口
语句丢失。尝试pressing <大骨节病>控制骨节病> + <大骨节病>移骨节病> + <大骨节病> 0 骨节病>,Eclipse会自动如果缺少添加import语句。
Probably, the import
statement is missing. Try pressing Ctrl+Shift+O, Eclipse will automatically add the import statement if missing.
再来看一下文件的顶部,看看已被添加。它应该是这样的:
Then look at the top of the file and see what has been added. It should be something like this:
import android.content.Intent;
这篇关于在Eclipse的意图不能被解析为一个类型“的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文