• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps [Error] Unable to start activity ComponentInfo: java.lang.IllegaStateException

ondrovic

Newbie
I am getting this and can't seem to find out why any thoughts or suggestions?

Code:
03-04 14:04:41.565: E/AndroidRuntime(742): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ondrovic.boombozzpassport/com.ondrovic.boombozzpassport.BeerForm}: java.lang.IllegalStateException: get field slot from row 0 col -1 failed
Here is the code where I am trying to start the activity

Code:
private AdapterView.OnItemClickListener onListClick = new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View v, int pos, long id) {
            
            Intent intent = new Intent(getApplicationContext(), BeerForm.class);
            
            intent.putExtra(BeerForm.INTENT_BEER_ID, String.valueOf(id));
            startActivity(intent);
        }
    };
Here is the code that handles the id
Code:
if (beerId != null) {
            
            beer = Beer.getById(beerId, db);
            
            vName.setText(beer.getName());
            vBrewer.setText(beer.getBrewer());
            vType.setText(beer.getType());
            vABV.setText(beer.getABV());
            vbDesc.setText(beer.getbDesc());
            vfDesc.setText(beer.getfDesc());
            vRating.setRating(beer.getRating());
            
        }

Also the activity will start if I take out the intent.putExtra(BeerForm.INTENT_BEER_ID, String.valueOf(id));
 
I figured it out it was an error looking for the different description I didn't have it matching the table data :-)
 
Back
Top Bottom