WeChatQRCode
WeChatQRCode copied to clipboard
WeChatQRCodeDetector中的空指针问题
private static String getExternalFilesDir(Context context,String path) {
File[] files = context.getExternalFilesDirs(path);
if(files!=null && files.length > 0){
return files[0].getAbsolutePath();
}
return context.getExternalFilesDir(path).getAbsolutePath();
}
其中files[0]可能为空,建议修复一下
没有内置的外部存储卡?
嗯,只是一种可能的情况,建议还是优化一下