代码有两处报错
temp = findViewById(R.id.temp_text);//温湿度显示
mq = findViewById(R.id.mq_text);//气体浓度显示
这里temp_text与mq_text报错
switch_c.setSwitchTextAppearance(MainActivity.this,R.style.s_true);
s_true报错
报错内容如下
switch_c.setSwitchTextAppearance(MainActivity.this,R.style.s_true);
^
����: ���� s_true
�: �� style
你是否漏了style.xml