https://github.com/ooftf/tc-anywhere
可以在任何方法内添加try catch 操作
https://github.com/ooftf/tc-anywhere
android exception plugin try-catch
Last synced: 5 months ago
JSON representation
可以在任何方法内添加try catch 操作
- Host: GitHub
- URL: https://github.com/ooftf/tc-anywhere
- Owner: ooftf
- Created: 2021-03-11T11:19:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T03:19:27.000Z (about 5 years ago)
- Last Synced: 2023-06-30T21:37:57.408Z (almost 3 years ago)
- Topics: android, exception, plugin, try-catch
- Language: Groovy
- Homepage:
- Size: 170 KB
- Stars: 44
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tc-anywhere
[](https://maven-badges.herokuapp.com/maven-central/com.github.ooftf/tc-anywhere)
要解决的问题:有一些第三方包中存在一些崩溃问题,如果能try catch处理并不会影响程序运行,这时候就可以使用tc-anywhere来处理
目标:可以在任何地方添加try catch 操作;(目前只是实现了在方法无返回值的情况下添加try catch操作)
# 使用
```groovy
//project
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.ooftf:tc-anywhere:0.0.2'
}
//app
apply plugin: 'tc-anywhere'
// 第一个参数为要插入tryCatch的类名,后面的为该类的方法名(只支持无返回值的方法)
tca {
tc 'com.ooftf.tca.MainActivity', 'test(I)V', 'onCreate(Landroid/os/Bundle;)V'
}
```