|
之前一直用 q215613905 这个版本的tvbox 结果这段时间阿里云老断流 木有办法今天看 takagen99 这个版本的tvbox 修复了阿里云断流问题
就拉了下来编译一下 结果 我家电视一直闪退安装完了启动就闪退。然后就真机调试了下
嗯 这里 FileUtils.cleanPlayerCache(); 这里有问题。
就是启动清理。。
q215613905 这个版本的tvbox 的木有这个问题 那就简单了直接 复制粘贴
private static boolean deleteDir(File dir) {
if (dir != null && dir.isDirectory()) {
String[] children = dir.list();
for (String child: children) {
boolean success = deleteDir(new File(dir, child));
if (!success) {
return false;
}
}
}
return dir.delete();
}
//启动app清除
public static void cleanPlayerCache() {
String ijkCachePath = getCachePath() + "/ijkcaches/";
String thunderCachePath = getCachePath() + "/thunder/";
String jpaliCachePath = getCachePath() + "/jpali/Downloads/";
File ijkCacheDir = new File(ijkCachePath);
File thunderCacheDir = new File(thunderCachePath);
File jpaliCacheDir = new File(jpaliCachePath);
try {
if (ijkCacheDir.exists()) deleteDir(ijkCacheDir);
} catch (Exception e) {
e.printStackTrace();
}
try {
if (thunderCacheDir.exists()) deleteDir(thunderCacheDir);
} catch (Exception e) {
e.printStackTrace();
}
try {
if (jpaliCacheDir.exists()) deleteDir(jpaliCacheDir);
} catch (Exception e) {
e.printStackTrace();
}
}
替换
public static void cleanPlayerCache() {
String thunderCachePath = getCachePath() + "/thunder/";
File thunderCacheDir = new File(thunderCachePath);
try {
if (thunderCacheDir.exists()) recursiveDelete(thunderCacheDir);
} catch (Exception e) {
e.printStackTrace();
}
String ijkCachePath = getExternalCachePath() + "/ijkcaches/";
File ijkCacheDir = new File(ijkCachePath);
try {
if (ijkCacheDir.exists()) recursiveDelete(ijkCacheDir);
} catch (Exception e) {
e.printStackTrace();
}
String jpaliCachePath = getExternalCachePath() + "/jpali/Downloads/";
File jpaliCacheDir = new File(jpaliCachePath);
try {
if (jpaliCacheDir.exists()) recursiveDelete(jpaliCacheDir);
} catch (Exception e) {
e.printStackTrace();
}
}
编译 顺利进入应用。愉快的玩耍 测试30多分钟木有断流现象。。。手工
高手勿喷 感谢配合
下载地址回复可见
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|