search

Home  >  Q&A  >  body text

android - 获取Sd 卡 目录为空

String downloadApkPath = context.getApplicationContext().getExternalFilesDir("Apk").getAbsolutePath();

大神们 这方法 老是 空指针 有遇到的吗

Failed to fstatat(/mnt/shell/emulated/0/Android/data/cn.wdcloud.appcenter): Device or resource busy

日志 里 老是 报这个问题 大神们 这个问题遇到过吗

查看 SD 卡上Android/data/ 下 没有刚才安装的那个 应用程序的包名

伊谢尔伦伊谢尔伦2851 days ago891

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 17:48:24

    Have you deleted this directory or file after downloading? If so, rename it before operating, as follows:

    final File to = new File(file.getAbsolutePath() + System.currentTimeMillis());
    file.renameTo(to);
    to.delete();

    reply
    0
  • Cancelreply