2017-01-02 8 views
1

실제로 CRUD로 구성된 앱을 수행하고 있습니다.저장을 시도 할 때 Android + 구문 분석 오류가 발생했습니다.

양식을 정보로 채우고 저장하면 응용 프로그램이 멈추고 그 이유는 모르겠습니다.

입니다 로그 내가 얻을 :

01-02 16:15:59.731 11444-11510/com.reforcointeligente.brainstormapp  E/HAL: SLCODE-loaded class_id=gralloc 
01-02 16:15:59.731 11444-11510/com.reforcointeligente.brainstormapp  E/HAL: SLCODE-loaded name=gralloc 
01-02 16:15:59.731 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-loaded prop_name=ro.hardware.gralloc 
01-02 16:15:59.731 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-loaded for circle execute 
01-02 16:15:59.731 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists HAL_LIBRARY_PATH2=/vendor/lib64/hw, name=gralloc, subname=mt6735 
01-02 16:15:59.731 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists HAL_LIBRARY_PATH1=/system/lib64/hw, name=gralloc, subname=mt6735 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists return ENOENT 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists HAL_LIBRARY_PATH2=/vendor/lib64/hw, name=gralloc, subname=MT6737T 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists HAL_LIBRARY_PATH1=/system/lib64/hw, name=gralloc, subname=MT6737T 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists return ENOENT 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists HAL_LIBRARY_PATH2=/vendor/lib64/hw, name=gralloc, subname=mt6737t 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-hw_module_exists HAL_LIBRARY_PATH1=/system/lib64/hw, name=gralloc, subname=mt6737t 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp E/HAL: SLCODE-loaded HAL id=gralloc path=/system/lib64/hw/gralloc.mt6737t.so 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp I/[MALI][Gralloc]: [+]r_hnd(0x7f7d738220), client(27), share_fd(43) 
01-02 16:15:59.732 11444-11510/com.reforcointeligente.brainstormapp D/GraphicBuffer: register, handle(0x7f7d738220) (w:720 h:1280 s:720 f:0x1 u:0x000b00) 

앱의 brokes을 나는이 메서드를 호출 : 그래서

@ParseClassName("Student") 
public class Student extends ParseObject { 

    public String getStudentName() { 
     return getString(getStudentNameTitle()); 
    } 

    public void setStudentName(String studentName) { 
     put(getStudentNameTitle(), studentName); 
    } 

    public String getStudentAge() { 
     return getString(getStudentAgeTitle()); 
    } 

    public void setStudentAge(String studentAge) { 
     put(getStudentAgeTitle(), studentAge); 
    } 

    public String getStudentAddress() { 
     return getString(getStudentAddressTitle()); 
    } 

    public void setStudentAddress(String studentAddress) { 
     put(getStudentAddressTitle(), studentAddress); 
    } 

    public String getStudentCity() { 
     return getString(getStudentCityTitle()); 
    } 

    public void setStudentCity(String studentCity) { 
     put(getStudentCityTitle(), studentCity); 
    } 

    public String getStudentSchoolYear() { 
     return getString(getStudentSchoolYearTitle()); 
    } 

    public void setStudentSchoolYear(String studentSchoolYear) { 
     put(getStudentSchoolYearTitle(), studentSchoolYear); 
    } 

    public String getStudentSchool() { 
     return getString(getStudentSchoolTitle()); 
    } 

    public void setStudentSchool(String studentSchool) { 
     put(getStudentSchoolTitle(), studentSchool); 
    } 

    public String getStudentParentName() { 
     return getString(getStudentParentNameTitle()); 
    } 

    public void setStudentParentName(String studentParentName) { 
     put(getStudentParentNameTitle(), studentParentName); 
    } 

    public String getStudentParentPhone() { 
     return getString(getStudentParentPhoneTitle()); 
    } 

    public void setStudentParentPhone(String studentParentPhone) { 
     put(getStudentParentPhoneTitle(), studentParentPhone); 
    } 

    public String getStudentParentCellphone() { 
     return getString(getStudentParentCellphoneTitle()); 
    } 

    public void setStudentParentCellphone (String studentParentCellphone) { 
     put(getStudentParentCellphoneTitle(), studentParentCellphone); 
    } 

    public String getStudentParentEmail() { 
     return getString(getStudentParentEmailTitle()); 
    } 

    public void setStudentParentEmail(String studentParentEmail) { 
     put(getStudentParentEmailTitle(), studentParentEmail); 
    } 

    public static ParseQuery<Student> getQuery() { 
     return ParseQuery.getQuery(Student.class); 
    } 

    public static String getStudentNameTitle() { 
     return "nome_aluno"; 
    } 

    private static String getStudentAgeTitle() { 
     return "idade_aluno"; 
    } 

    private static String getStudentAddressTitle() { 
     return "endereco_aluno"; 
    } 

    private static String getStudentCityTitle() { 
     return "cidade_aluno"; 
    } 

    private static String getStudentSchoolYearTitle() { 
     return "serie_aluno"; 
    } 

    private static String getStudentSchoolTitle() { 
     return "colegio_aluno"; 
    } 

    private static String getStudentParentNameTitle() { 
     return "nome_pai_aluno"; 
    } 

    private static String getStudentParentPhoneTitle() { 
     return "telefone_pai_aluno"; 
    } 

    private static String getStudentParentCellphoneTitle() { 
     return "celular_pai_aluno"; 
    } 

    private static String getStudentParentEmailTitle() { 
     return "email_pai_aluno"; 
    } 
} 

답변

1

:

public void onStudentCreated() { 
    Student student = new Student(); 

    EditText studentNameEditText = (EditText) findViewById(R.id.editTextStudentName); 
    EditText studentAgeEditText = (EditText) findViewById(R.id.editTextStudentAge); 
    EditText studentSchoolEditText = (EditText) findViewById(R.id.editTextStudentSchool); 
    EditText studentAddressEditText = (EditText) findViewById(R.id.editTextStudentAddress); 
    EditText studentParentNameEditText = (EditText) findViewById(R.id.editTextStudentParentName); 
    EditText studentParentCellphoneEditText = (EditText) findViewById(R.id.editTextStudentParentCellphone); 
    EditText studentParentPhoneEditText = (EditText) findViewById(R.id.editTextStudentParentPhone); 
    EditText studentParentEmailEditText = (EditText) findViewById(R.id.editTextStudentParentEmail); 

    String studentName = studentNameEditText.getText().toString(); 
    String studentAge = studentAgeEditText.getText().toString(); 
    String studentSchool = studentSchoolEditText.getText().toString(); 
    String studentAddress = studentAddressEditText.getText().toString(); 
    String studentCity = spinner.getSelectedItem().toString(); 
    String studentParentName = studentParentNameEditText.getText().toString(); 
    String studentParenteCellphone = studentParentCellphoneEditText.getText().toString(); 
    String studentParentPhone = studentParentPhoneEditText.getText().toString(); 
    String studentParentEmail = studentParentEmailEditText.getText().toString(); 

    student.setStudentName(studentName); 
    student.setStudentAge(studentAge); 
    student.setStudentSchool(studentSchool); 
    student.setStudentAddress(studentAddress); 
    student.setStudentCity(studentCity); 
    student.setStudentParentName(studentParentName); 
    student.setStudentParentCellphone(studentParenteCellphone); 
    student.setStudentParentPhone(studentParentPhone); 
    student.setStudentParentEmail(studentParentEmail); 

} 

마지막을이 내 모델입니다 내 문제는 Parse를 구성하는 것이 었습니다. 방금 포기하고 사용하기 시작한 firebase를 사용하기 시작했습니다. 설정하기 쉽고, 사용하기 쉽고, 더 많은 문서를 가지고 있기 때문에 훨씬 더 낫습니다.