FreeReflection一个允许你在Android P上使用反射而没有任何限制的库

FreeReflection

FreeReflection is a library that lets you use reflection without any restriction above Android P (includes Q).

Github: https://github.com/tiann/FreeReflection/

Usage

  1. Add dependency to your project(jcenter):
implementation 'me.weishu:free_reflection:2.2.0'
  1. Add one line to your Application.attachBaseContext:
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    Reflection.unseal(base);
}

Then you can use the reflection API normally, all the restrictions are gone. Enjoy yourself 🙂

Under the hood

free reflection above android p

another way to use reflection api above android p

上一篇 Android组件化开发+自定义路由框架
下一篇 Android USB通信入门篇
目录
文章列表
1 Appium自动化测试(8)—— 定位控件
Appium自动化测试(8)—— 定位控件
2
laravel-admin文件上传及处理
laravel-admin文件上传及处理
3
TestNG编写测试
TestNG编写测试
4
Android AOP开发之AspectJ的使用
Android AOP开发之AspectJ的使用
5
Java多线程编程三(volatile关键字)
Java多线程编程三(volatile关键字)
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。