Helli,我的代码中出现错误消息“)”
这是我的代码
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);
if(resultCode==RESULT_OK){
if (requestCode == 1){
File f = new File(Environment.getExternalStorageDirectory().toString()
for (File temp : f.listFiles()){
if (temp.getName().equals("temp.png")){
f = temp;
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode==RESULT_OK) {
if (requestCode == 1) {
File f = new File(Environment.getExternalStorageDirectory().toString());
for (File temp : f.listFiles()) {
if (temp.getName().equals("temp.png")){
f = temp;
break;
}
}
}
}
}
问题1:下一行缺少);
File f = new File(Environment.getExternalStorageDirectory().toString()
问题2:最后,您错过了3个大括号}