Eclipse的内容辅助工作不与Android [英] Eclipse Content Assist not working with Android
问题描述
我不知道这是我的Eclipse安装(太阳神)和Android SDK的还是其他什么东西,但Eclipse的内容辅助不建议为Android类对象的方法有问题。
例如,如果我创建一个简单的程序,并添加一个按钮BTN,当我去使用BTN方法setBackgroundResource(INT)与内容辅助(Ctrl +空格键)或Word完成(Alt + /)他们都不具备任何提案。如果我输入BTN(Ctrl +空格键),内容辅助列表;等于()的getClass(),有code(),通知()...等(),显示没有任何的按键方法!任何人都可以帮忙吗?
进口android.app.Activity;
进口android.os.Bundle;
进口android.widget.Button;
公共类的HelloWorld延伸活动{
@覆盖
公共无效的onCreate(包冰柱){
super.onCreate(冰柱);
的setContentView(R.layout.main);
按钮BTN =按钮(这一点);
BTN(Ctrl +空格键)
}
}
嗯,发现了这个问题,它的下跌给出乱子的工作区,创建了一个新的工作空间和复制我的项目,又都在努力!
I'm not sure is this is a problem with my installation of Eclipse (Helios) and Android SDK or something else but Eclipse Content Assist doesn't propose Object Methods for Android classes.
For example, if I create a simple program and add a Button btn, when I go to use the btn method setBackgroundResource(int) with Content Assist (Ctrl + Space) or Word Completion (Alt + /) neither of them have any proposals. If I type btn.(Ctrl + Space), Content Assist lists; equals(), getClass(), hasCode(), Notify()...wait(), shows none of the Button methods! Can anyone help?
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
public class HelloWorld extends Activity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
Button btn = Button(this);
btn.(Ctrl + Space)
}
}
Ah, found the problem, it's down to something going wrong with the workspace, created a new workspace and copied over my projects, all working again!
这篇关于Eclipse的内容辅助工作不与Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!