Pascal Nagel
- Forum-Beiträge: 2
31.03.2012, 15:57:39 via Website
31.03.2012 15:57:39 via Website
Hey,
the following lines crash android with a NPE:
Spinner spinner = (Spinner) findViewById(R.id.type);
Object type = spinner.getSelectedItem();
I checked the id for correct spelling in the xml.
The spinner is being populated in the first activity, after a button is pressed a new activity is opened corresponding to the class containing the above code.
Please Help
Pascal
the following lines crash android with a NPE:
Spinner spinner = (Spinner) findViewById(R.id.type);
Object type = spinner.getSelectedItem();
I checked the id for correct spelling in the xml.
The spinner is being populated in the first activity, after a button is pressed a new activity is opened corresponding to the class containing the above code.
Please Help
Pascal
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.