Caused by: java.lang.NullPointerException
at com.example.fdc.Medical_Record.onCreate(Medical_Record.java:84)
Record11.setText(pcomplain); // Record11 從未 findViewById 初始化
宣告了 11 個 TextView 變數(Record1~Record11),但 onCreate 中只 findViewById 了前 10 個(Record1~Record10),Record11 仍為 null。
Record11 = (TextView) findViewById(R.id.precord11); // 缺少這行
Record11.setText(pcomplain);
Caused by 找到具體行號Ctrl+Click 跳轉)ViewBinding 或 DataBinding 避免手寫 findViewById 導致漏寫