Closed zjianflys closed 3 years ago
测试正常啊,没发现问题??
我又从主页下载了app 切换3中内核 点击缓存下载支持 按钮 都报错 闪退
我录屏 群里面发不进来
我这边看log和效果都正常播放,不大理解为什么你闪退,你闪退 crash 的原因是?
2021-10-27 15:06:49.013 20121-20121/? E/libc: Access denied finding property "persist.device_config.runtime_native.use_app_image_startup_cache"
2021-10-27 15:06:49.048 20121-20121/com.example.gsyvideoplayer D/ApplicationLoaders: createClassLoader zip: /data/app/com.example.gsyvideoplayer-_Z_ff9FOlRf80K_013cWWw==/base.apk librarySearchPath: /data/app/com.example.gsyvideoplayer-_Z_ff9FOlRf80K_013cWWw==/lib/arm64:/data/app/com.example.gsyvideoplayer-_Z_ff9FOlRf80K_013cWWw==/base.apk!/lib/arm64-v8a libraryPermittedPath: /data/user/0/com.example.gsyvideoplayer parent: java.lang.BootClassLoader@a3e8ad0 targetSdkVersion: 30 isBundled: false classLoaderName: null sharedLibraries: null
2021-10-27 15:06:49.013 20121-20121/? E/.gsyvideoplaye: LoadAppImageStartupCache enabled : 1
2021-10-27 15:06:49.013 20121-20121/? E/.gsyvideoplaye: Unknown bits set in runtime_flags: 0x8000
createClassLoader zip: /data/app/com.example.gsyvideoplayer-_Z_ff9FOlRf80K_013cWWw==/base.apk librarySearchPath: /data/app/com.example.gsyvideoplayer-_Z_ff9FOlRf80K_013cWWw==/lib/arm64:/data/app/com.example.gsyvideoplayer-_Z_ff9FOlRf80K_013cWWw==/base.apk!/lib/arm64-v8a libraryPermittedPath: /data/user/0/com.example.gsyvideoplayer parent: java.lang.BootClassLoader@a3e8ad0 targetSdkVersion: 30 isBundled: false classLoaderName: null sharedLibraries: null
我有点不理解这句话是什么意思
我在Q群里面留言了 不晓得大神在里面没得
你这个log看不出东西啊,也看不出来和gsy有什么关系
2021-10-28 16:09:41.784 7490-7490/com.example.gsyvideoplayer E/GSYVideoPlayer: ###### url file:///data/user/0/com.example.gsyvideoplayer/cache/video-cache/09096f089ee62e47028790742e8e0c1a.mp4
2021-10-28 16:09:41.794 7490-7490/com.example.gsyvideoplayer D/AndroidRuntime: Shutting down VM
2021-10-28 16:09:41.795 7490-7490/com.example.gsyvideoplayer E/AndroidRuntime: JUNK_FATAL_EXCEP: FATAL EXCEPTION: main,Process: com.example.gsyvideoplayer, PID: 7490
2021-10-28 16:09:41.796 7490-7490/com.example.gsyvideoplayer E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.gsyvideoplayer, PID: 7490
java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but was 'file'
at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1254)
at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1633)
at okhttp3.Request$Builder.url(Request.kt:184)
at com.zhy.http.okhttp.request.OkHttpRequest.initBuilder(OkHttpRequest.java:49)
at com.zhy.http.okhttp.request.OkHttpRequest.<init>(OkHttpRequest.java:39)
at com.zhy.http.okhttp.request.GetRequest.<init>(GetRequest.java:15)
at com.zhy.http.okhttp.builder.GetBuilder.build(GetBuilder.java:26)
at com.example.gsyvideoplayer.DetailDownloadPlayer.startDownload(DetailDownloadPlayer.java:262)
at com.example.gsyvideoplayer.DetailDownloadPlayer.access$500(DetailDownloadPlayer.java:33)
at com.example.gsyvideoplayer.DetailDownloadPlayer$5.onClick(DetailDownloadPlayer.java:165)
at android.view.View.performClick(View.java:7250)
at android.view.View.performClickInternal(View.java:7227)
at android.view.View.access$3500(View.java:819)
at android.view.View$PerformClick.run(View.java:27749)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
大神 麻烦看一下呀 这个报错
private void startDownload(String url) {
//打印:###### url file:///data/user/0/com.example.gsyvideoplayer/cache/video-cache/09096f089ee62e47028790742e8e0c1a.mp4
Debuger.printfError("###### url " + url);
//下载demo然后设置
requestCall = OkHttpUtils.get().url(url)
.build();
requestCall.execute(new MemoryCallBack() {
@Override
public void onError(Call call, Exception e, int id) {
}
@Override
public void onResponse(Boolean response, int id) {
stopDownload();
}
});
}
这个请求url 地址不是以http或https 开始 ,您那边测试不会报这个错嘛
private void startDownload(String url) {
//打印:###### url file:///data/user/0/com.example.gsyvideoplayer/cache/video-cache/09096f089ee62e47028790742e8e0c1a.mp4
Debuger.printfError("###### url " + url);
// url = "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4";
// url = "http://vfx.mtime.cn/Video/2019/02/04/mp4/190204084208765161.mp4";
url = "http://www.baidu.com";
//下载demo然后设置
requestCall = OkHttpUtils.get().url(url)
.build();
requestCall.execute(new MemoryCallBack() {
@Override
public void onError(Call call, Exception e, int id) {
}
@Override
public void onResponse(Boolean response, int id) {
LogUtils.i("--------\nresponse:" + response + "\nid:" + id);
stopDownload();
}
});
}
我分析了一下这点的代码
requestCall = OkHttpUtils.get().url(url)
.build();
这个只是获取RequestCall 这点的url 没得实际作用
我在这点把uri 改成百度网站 下载的文件还是用的getUrl()里面的网址
private String getUrl() {
String url = "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4";
url = "http://vfx.mtime.cn/Video/2019/02/04/mp4/190204084208765161.mp4";
return url;
}
这点我大概懂起了.. HttpProxyCacheServer 这个代理 目前还没搞懂哦....
问题描述:
点击
问题机型/系统:
例如 真机 荣耀想x10
GSY依赖版本
源码 v8.1.6
Demo中的复现步骤
Demo中的DetailDownloadPlayer页面点击startDown按钮
问题log(如果有)
https://github.com/zjianflys/flyDemo/blob/main/%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86/1.jpg https://github.com/zjianflys/flyDemo/blob/main/%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86/2.jpg