我的代码中出现“无法解析为类型”。我正在寻找解决方案,但所有解决方案均无效。
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
public class Vortex extends Activity {
private static final String LOG_TAG = Vortex.class.getSimpleName();
private VortexView _vortexView; //there is the problem
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
_vortexView = new VortexView(this);
setContentView(_vortexView);
}
}
此代码中的 VortexView 存在问题。 Eclipse 告诉我 VortexView 无法解析为类型。
有什么解决办法吗?
最佳答案
您的项目中是否有 VortexView 类,如果有,ctrl+shift+O 将解决问题。否则将类/jar 添加到 classpaht 并执行 ctrl+shift+O(组织导入)。
关于Android无法解析为类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9051976/