在 android 25 的版本以下 CodeLocatorLayoutInflator 调用 createView 会报 nullpoint
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start at CodeLocatorLayoutInflator.createView and trace how HookInflater obtains the Context from LayoutInflater on Android versions below 25. Reproduce the NullPointerException with the reported workaround disabled, then verify that view creation and skinning work without disabling HookInflater on those versions.
Written by the indexing model from the issue text.
Description
具体原因是 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())
}
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 182
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytedance/CodeLocator
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bytedance/CodeLocator#101 ·
-
能否支持compose? Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
bytedance/CodeLocator#99 ·
-
支持compose Open
Difficulty 4/5 3-5 days Newbie friendliness 42/100
bytedance/CodeLocator#96 · 1 comment · 4 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
bytedance/CodeLocator#94 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bytedance/CodeLocator#93 ·
All issues in bytedance/CodeLocator
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100