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 Spring Boot自定义Druid数据源
Spring Boot自定义Druid数据源
2
MyBatis 报错 No bean named org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry
MyBatis 报错 No bean named org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry
3
Linux下安装OpenResty
Linux下安装OpenResty
4
Java通过解析文件获取apk信息
Java通过解析文件获取apk信息
5
工作流框架调研文档 - 支付系统人工审批流技术选型参考
工作流框架调研文档 - 支付系统人工审批流技术选型参考
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。