I find an error when I create a counter. It seems that the counter is Null, but I'm not sure where the problem is. I created an array of strings in the strings.xml file. Are there any things that I missed?
the code:
public class NewWorkOrder extends ActionBarActivity { private Spinner spinner; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_new_work_order); this.spinner = (Spinner) findViewById(R.id.workTypeSpinner);
Logcat
06-11 03:02:30.174: E/AndroidRuntime(1389): FATAL EXCEPTION: main 06-11 03:02:30.174: E/AndroidRuntime(1389): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cosmic.workorder/com.cosmic.workorder.NewWorkOrder}: java.lang.IllegalArgumentException: No view found for id 0x7f05003c (com.cosmic.workorder:id/container) for fragment PlaceholderFragment{41735b50
android android spinner
user3728777 Jun 11 '14 at 6:37 a.m. 2014-06-11 06:37 a.m.
source share