Note that there are some explanatory texts on larger screens.

plurals
  1. POTask cannot be resolved to a type
    primarykey
    data
    text
    <p>I am trying to make a task manager application and I get one error in line </p> <pre><code>`Task t = new Task(taskName)` </code></pre> <p>although Eclipse say "Task" cannot be resolved to a type and here is not any import show in my eclipse for Task but there show in the tutorial. What can I do? Please help.</p> <p>My source code is</p> <pre><code>package com.vikram.task.manager; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; public class AddTaskActivity extends Activity { private Button addButton; private EditText editText; private Button cancel; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.add_tasks); setUpView(); } protected void cancel() { finish(); } protected void addTask() { String taskName = editText.getText().toString(); Task t = new Task(taskName); getTaskManagerApplication().addTask(t); } private ViewTasksActivity getTaskManagerApplication() { ViewTasksActivity tma = (ViewTasksActivity)getApplication(); return tma; } private void setUpView() { addButton = (Button)findViewById(R.id.button2); editText = (EditText)findViewById(R.id.editText1); cancel = (Button)findViewById(R.id.button1); addButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { addTask(); } }); cancel.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { cancel(); } }); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload