inserting data in sqlite database errors

二次信任 提交于 2019-12-02 12:33:22

The error is in (com.stage.sondage.Questionnaire.onCreate(Questionnaire.java:54)), can you indicate which line is this?

another thing, in the following part mRadioGroup should vary right? mRadioGroup1, mRadioGroup2,..etc:

RadioButton b1 = (RadioButton)findViewById(mRadioGroup1.getCheckedRadioButtonId());
appreciation.setRep1((String) b1.getText());
RadioButton b2 = (RadioButton)findViewById(mRadioGroup1.getCheckedRadioButtonId());
appreciation.setRep1((String) b2.getText());
RadioButton b3 = (RadioButton)findViewById(mRadioGroup1.getCheckedRadioButtonId());
appreciation.setRep1((String) b3.getText());
RadioButton b4 = (RadioButton)findViewById(mRadioGroup1.getCheckedRadioButtonId());
appreciation.setRep1((String) b4.getText());
RadioButton b5 = (RadioButton)findViewById(mRadioGroup1.getCheckedRadioButtonId());
appreciation.setRep1((String) b5.getText());
      after seeing your log there is null pointer exception in below class

       **public class Questionnaire extends Activity**  ..at line nuber 53 or 54 
        you may to see that line your class and debugg and see which object value
         coming as null and fix it 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!