网上的方法照抄
package=”cn.wangchunyang.myapplication”>
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
String path= Environment.getExternalStorageDirectory()+”/Download”;
File file=new File(path);
if (file.canRead()) {
Log.v(“TAG”, “可读”);
}
if (file.canWrite()) {
Log.v(“TAG”, “可写”);
}else {
Log.v(“TAG”,path);
}
}
}
log 输出 /storage/14EF-260F/Download 这个路径存在啊!