s1 = (Spinner) findViewById(R.id.ProductTypeSpinner);
ArrayAdapter<CharSequence> adapter= ArrayAdapter.createFromResource(this, R.array.Product_Types, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
s1.setAdapter(adapter);
当我设置s1.setAdapter(适配器);它会遇到nullPointerException