上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: Kotlin return@xxx 的坑 避坑指南!!! 阅读全文
posted @ 2023-08-13 00:06 SharpCJ 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 某天将项目 kotlin 版本升级到了 1.8.0 ,然后编译报错了, Duplicate class kotlin-stblib vs kotlin-stdlib-jdk7/8 然后开始寻求解决方案... Duplicate class kotlin-stblib vs kotlin-stdlib 阅读全文
posted @ 2023-05-14 10:53 SharpCJ 阅读(661) 评论(0) 推荐(0) 编辑
摘要: 一、根目录下 build.gradle 变更 变更前: buildscript { ext.kotlin_version = '1.5.0' repository { repository { mavenCentral() jcenter() } dependencies { classpath ' 阅读全文
posted @ 2023-05-13 19:17 SharpCJ 阅读(3716) 评论(0) 推荐(0) 编辑
摘要: 一、添加依赖和网络权限 添加依赖 implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' // 可选 implementat 阅读全文
posted @ 2023-04-08 16:33 SharpCJ 阅读(292) 评论(0) 推荐(0) 编辑
摘要: protobuf 在 android 中的使用入门 阅读全文
posted @ 2023-04-08 16:15 SharpCJ 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1). 检查仓储 .git/hook 下面是否有 commit-msg 文件,如果没有可以到下面的地址下载,或者把其他同事的 commit-msg 文件拷贝到你的 .git/hook 重新commit即可。 http://review.cyanogenmod.org/tools/hooks/comm 阅读全文
posted @ 2023-04-08 16:03 SharpCJ 阅读(1334) 评论(0) 推荐(0) 编辑
摘要: 一、内联拓展函数 let let 扩展函数的实际上是一个作用域函数,当你需要去定义一个变量在一个特定的作用域范围内,let函数的是一个不错的选择;let函数另一个作用就是可以避免写一些判断null的操作。 1.1 let 函数的使用的一般结构 object.let { it.todo() //在函数 阅读全文
posted @ 2022-04-13 20:57 SharpCJ 阅读(1789) 评论(0) 推荐(2) 编辑
摘要: Android生成文件失败:java.lang.IllegalStateException:Failed to build unique file: /storage/emulated/0/... 1.问题来源 App 调用相机拍照,中间有一些处理过程,然后将这张照片插入系统图片数据库中。 Medi 阅读全文
posted @ 2022-04-13 20:31 SharpCJ 阅读(660) 评论(0) 推荐(0) 编辑
摘要: 使用 viewpager2 时遇到如下错误, 使用 recyclerview 也有可能会遇到 : 2022-02-10 14:15:43.510 12151-12151/com.sharpcj.demo1 D/sharpcj_tag: onBindViewHolder ... 2022-02-10 阅读全文
posted @ 2022-04-13 20:27 SharpCJ 阅读(810) 评论(0) 推荐(0) 编辑
摘要: 本文是 Kotlin 协程系列最后一篇文章,讲述了在 Android 中使用协程的一些奇技淫巧。大多数类容出自 google IO 大会 阅读全文
posted @ 2022-01-15 00:40 SharpCJ 阅读(4486) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页