LifeHelper: 组件化综合案例,包含微信新闻,头条视频,美女照片

电脑杂谈  发布时间:2020-01-26 15:03:36  来源:网络整理

ijkplayer支持mkv吗_ubuntu ijkplayer_ijkplayer jar

README.md

组件方式跟集成模式如何切换

ext {
    isAndroidApplication = false  //玩Android模块开关,false:作为Lib组件存在, true:作为application存在
    isVideoApplication = true  //视频模块开关,false:作为Lib组件存在, true:作为application存在
    isNoteApplication = false  //记事本模块开关,false:作为Lib组件存在, true:作为application存在
    isGameApplication = false  //游戏模块开关,false:作为Lib组件存在, true:作为application存在

模块众多ijkplayer jar,如何统一设置第三方库,以及build.gradle中的配置信息 切换网络请求方法,比如公司陆续项目就有:正式线上环境,测试环境,仿真环境等等 编译时间 编译遇到问题 音乐部分(音乐播放器,自动搜索本地音乐文件,音乐是百度音乐api) 视频部分(视频播放器,自动搜索本地视频文件,还有许多网络搞笑视频) 图片部分(干货美女照片),画廊浏览高清大图 豆瓣电影,音乐,读书(豆瓣接口) 简易ToDo记事本,番茄周,学习MVP+Dagger2时写的。 超文本笔记本,可以支持文字,图片,动态图混排,做便签十分方便,注意高清照片会压缩,目前笔记是储存本地 技术分享部分(鸿洋玩Android,还有代码家的干活等等),关于flutter版本的极致体验玩Android客户端 love爱意表达部分,程序员表白神器,简易含蓄的单身程序员可以看看该模块,可以帮女朋友一个惊喜! 玩Android部分,接口是鸿洋大神开放的api,学习kotlin时所写 markDown格式笔记本,支持md格式,数据是保存到本地。

对于程序员,markDown是非常方便记录笔记 游戏部分,包括智慧拼图,还有童年飞机大战游戏,体验更加好看。 其他个别,几乎融合了自己开源的大部分封装库ijkplayer jar,比如,状态管理,视频库,轮播图,幸运大转盘[],画廊,自定义进度条,图片缩放,线程池 存在的弊端 业务组件: 功能模块: 基础部件: 组件化模式下怎样通信

ubuntu ijkplayer_ijkplayer支持mkv吗_ijkplayer jar

网络解决方法 第二种解决方案 IOException: CreateProcess error=2, 系统找不到指定的文件。

Invoke-customs are only supported starting with Android O (–min-api 26) Process 'command 'build-tools\28.0.3\aapt.exe'' finished with non-zero exit value 1 Error:Execution ':app:transformClassesWithDexForDebug'. DexArchiveMergerException异常:dexarchivemergeexception:合并dex存档时错误

重点异常信息:
Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
Caused by: com.android.tools.r8.utils.AbortException
#The option 'android.enableD8' is deprecated and should not be used anymore.
#Use 'android.enableD8=true' to remove this warning.
#It will be removed at the end of 2018..
android.enableD8=false
android.enableD8.desugaring = false

kotlin和realm配置问题

apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'

出现其它编译类错误,可以直接谷歌搜索解决

- A.详细崩溃日志信息
- B.查看崩溃类信息
- C.项目中异常分析
- D.引发崩溃日志的流程分析
- F.解决办法
- G.其他延申

01.崩溃bug日志总结1 02.崩溃bug日志总结2 03.崩溃bug日志总结3 [04.崩溃bug日志总结4]

ijkplayer jar_ubuntu ijkplayer_ijkplayer支持mkv吗

image image image image image image image image

image image image image image

image image image image image image

image image image image image image image image image image image image

image image image image image

image image image image image image image image

image image image image image

image image image image image image image

可以使用ViewStub 视图层级<merge/> 自定义全局的状况管理器 如何评估这些无效代码

ubuntu ijkplayer_ijkplayer支持mkv吗_ijkplayer jar

为什么要用线程池 使用线程池管理的经典实例 关于线程池,线程,多线程的具体内容 第一种加载图片优化处理:压缩图片 第二种加载图片优化:不压缩加载高清照片如何做? 关于bitmap更多改进可以看我的这篇博客:技术博客大总结 网络缓存处理 解决方法 启动时间改进 使用注释代替泛型,代码如下所示

@Retention(RetentionPolicy.SOURCE)
public @interface ViewStateType {
    int HAVE_DATA = 1;
    int EMPTY_DATA = 2;
    int ERROR_DATA = 3;
    int ERROR_NETWORK = 4;
}

现在做法:

ijkplayer支持mkv吗_ubuntu ijkplayer_ijkplayer jar

大概的策略如下所示 具体优化操作

gradlew app:dependencies

关于依赖关系树的如下所示,此处省略这些代码

|    |    |    |    |    |    \--- android.arch.core:common:1.1.1 (*)
|    |    |    |         \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
|    +--- com.journeyapps:zxing-android-embedded:3.6.0
|    |    +--- com.google.zxing:core:3.3.2
|    |    \--- com.android.support:support-v4:25.3.1
|    |         +--- com.android.support:support-compat:25.3.1 -> 28.0.0 (*)
|    |         +--- com.android.support:support-media-compat:25.3.1
|    |         |    +--- com.android.support:support-annotations:25.3.1 -> 28.0.0
|    |         |    \--- com.android.support:support-compat:25.3.1 -> 28.0.0 (*)
|    |         +--- com.android.support:support-core-utils:25.3.1 -> 28.0.0 (*)
|    |         +--- com.android.support:support-core-ui:25.3.1 -> 28.0.0 (*)
|    |         \--- com.android.support:support-fragment:25.3.1 -> 28.0.0 (*)
\--- com.android.support:multidex:1.0.2 -> 1.0.3

然后查看这些重复jar 然后设置gradle配置代码

api (rootProject.ext.dependencies["zxing"]){
    exclude module: 'support-v4'
    exclude module: 'appcompat-v7'
}
Bitmap bitmap = bitmaps.get(position);
//正常是用来处理图片这种占用内存大的情况
bitmapSoftReference = new SoftReference<>(bitmap);
if(bitmapSoftReference.get() != null) {
    viewHolder.imageView.setImageBitmap(bitmapSoftReference.get());
}
//其实看glide底层源码可知,也做了相关软引用的操作

这样使用软引用好处 弱引用使用场景

private MyHandler handler = new MyHandler(this);
private static class MyHandler extends Handler{
    WeakReference<FirstActivity> weakReference;
    MyHandler(FirstActivity activity) {
        weakReference = new WeakReference<>(activity);
    }

    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
        switch (msg.what){
        }
    }
}

到底什么时候使用软引用,什么时候使用弱引用呢?

@Override
public void onError(Throwable e) {
    //直接调用即可
    ExceptionUtils.handleException(e);
}

避免复杂的视图树 避免频繁的requestLayout() UI线程被阻塞 避免出现内存抖动的几点建议: 内存抖动是因为长期对象在短时间内被配置而导致的,所以应做的就是谨慎对待这些可能会大量建立对象的状况。

image


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/bofangqi/article-138284-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 耶律大石
        耶律大石

        后面的报道一定是非常失望

      • 赵瑞
        赵瑞

        苏联当初的忘我好也是先警告后撞击的

      热点图片
      拼命载入中...