CodeLocator icon indicating copy to clipboard operation
CodeLocator copied to clipboard

在 android 25 的版本以下 CodeLocatorLayoutInflator 调用 createView 会报 nullpoint

Open hangox opened this issue 2 years ago • 0 comments

具体原因是 Android 25 版本以下 LayoutInflater 实现不同 ,args[0] 为 context 的初始化方式不同,最后导致new view的时候报 NullPointerExeception,我找不到修复的办法,目前是简单关闭了HookInflater 功能来绕过的 绕过代码如下

        if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1) {
            CLog.i(TAG, "CodeLocator 关闭对这个 ${Build.VERSION.SDK_INT} 版本的支持,会导致不能换肤")
            CodeLocator.config(CodeLocatorConfig.Builder().enableHookInflater(false).build())
        }

hangox avatar Feb 27 '23 09:02 hangox