gyf-dev / gyf-dev/ImmersionBar

java.lang.NoSuchFieldError

Open
#458 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
11.5k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Android p上出现该问题
java.lang.NoSuchFieldError
No instance field layoutInDisplayCutoutMode of type I in class Landroid/view/WindowManager$LayoutParams; or its superclasses (declaration of 'android.view.WindowManager$LayoutParams' appears in /system/framework/framework.jar!classes2.dex)

错误位置:

com.gyf.immersionbar.ImmersionBar.void fitsNotchScreen()(SourceFile:3)
com.gyf.immersionbar.ImmersionBar.void setBar()(SourceFile:2)
com.gyf.immersionbar.ImmersionBar.void init()(SourceFile:3)

目前收集到的出现该问题的手机有:
一加A6013
荣耀HRY AL00T
华为MAR TL00
华为PAR AL00
红米REDMI 7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing ImmersionBar.fitsNotchScreen(), setBar(), and init() from the reported stack trace, then inspect how WindowManager.LayoutParams.layoutInDisplayCutoutMode is accessed. Compare the affected Android devices and API levels with the project's compatibility behavior. Done means the reported devices no longer throw NoSuchFieldError while notch-screen handling remains functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.