getActivity / Logcat

Android 日志打印框架,在手机上可以直接看到 Logcat 日志啦

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

日志查看框架

集成步骤

  • 如果你的项目 Gradle 配置是在 7.0 以下,需要在 build.gradle 文件中加入
allprojects {
    repositories {
        // JitPack 远程仓库:https://jitpack.io
        maven { url 'https://jitpack.io' }
    }
}
  • 如果你的 Gradle 配置是 7.0 及以上,则需要在 settings.gradle 文件中加入
dependencyResolutionManagement {
    repositories {
        // JitPack 远程仓库:https://jitpack.io
        maven { url 'https://jitpack.io' }
    }
}
  • 配置完远程仓库后,在项目 app 模块下的 build.gradle 文件中加入远程依赖
dependencies {
    // 日志调试框架:https://github.com/getActivity/Logcat
    debugImplementation 'com.github.getActivity:Logcat:11.86'
}

AndroidX 兼容

  • 如果项目是基于 AndroidX 包,请在项目 gradle.properties 文件中加入
# 表示将第三方库迁移到 AndroidX
android.enableJetifier = true
  • 如果项目是基于 Support 包则不需要加入此配置

compileSdk 版本要求

  • 如果项目的 compileSdkVersion 小于 29,则需要先升级成 29
android {
    compileSdkVersion 29
}
  • 如果项目的 compileSdkVersion 大于等于 29,则不需要修改此配置

使用方式

  • 无需调用,直接运行,然后授予悬浮窗权限即可

  • 在 debug 模式下运行即可,在 release 正式打包的时不会集成本库,尽管放心

框架亮点

  • 只需集成,无需调用

  • 日志长按可复制分享

  • 支持将日志保存到本地

  • 长日志点击可收缩展开显示

  • 日志搜索结果支持文本高亮

  • 支持对指定 TAG 的日志屏蔽

  • 多个相同 TAG 日志自动合并显示

  • 仅在 Debug 下集成,无需手动初始化

作者的其他开源项目

微信公众号:Android轮子哥

Android 技术 Q 群:10047167

如果您觉得我的开源库帮你节省了大量的开发时间,请扫描下方的二维码随意打赏,要是能打赏个 10.24 🐵就太👍了。您的支持将鼓励我继续创作:octocat:点击查看捐赠列表

License

Copyright 2020 Huang JinQun

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Android 日志打印框架,在手机上可以直接看到 Logcat 日志啦

License:Apache License 2.0


Languages

Language:Java 100.0%