# I-anr **Repository Path**: longyn/I-anr ## Basic Information - **Project Name**: I-anr - **Description**: 一个抓Anr 慢方法的开源框架 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-15 - **Last Updated**: 2025-07-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # I-anr #### 介绍 {**以下是 Gitee 平台说明,您可以替换此简介** Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} #### 使用说明 导入仓库 ``` pluginManagement { repositories { maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } maven { url 'https://packages.aliyun.com/maven/repository/2386483-release-mhUqVd' credentials { username = "6166b8fa89e1d5005a9f5792" password = "W49P9mYH7aoH" } } google { content { includeGroupByRegex("com\\.android.*") includeGroupByRegex("com\\.google.*") includeGroupByRegex("androidx.*") } } mavenCentral() gradlePluginPortal() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { maven { url 'https://packages.aliyun.com/maven/repository/2386483-release-mhUqVd' credentials { username = "6166b8fa89e1d5005a9f5792" password = "W49P9mYH7aoH" } } google() mavenCentral() } } ``` 引入gradle插件 id 'com.lyn.plugin-anr' version '1.0.7' apply false ``` // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.androidApplication) apply false alias(libs.plugins.jetbrainsKotlinAndroid) apply false alias(libs.plugins.androidLibrary) apply false id 'com.lyn.plugin-anr' version '1.0.7' apply false } ``` 引入依赖 ``` implementation 'com.lyn:anr:1.0.7' ``` 使用和初始化(在application onCreate 初始化) ``` AnrHelper.initialize(object : InvokeListener{ override fun onInvoke( id: String, className: String, methodName: String, timeConsuming: Long ) { //这里可以写判断逻辑打印 } }) ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)