Skip to content

[2.0.0] java.lang.NullPointerException: null cannot be cast to non-null type android.view.ViewGroup #145

Closed
@efstathiosntonas

Description

@efstathiosntonas

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

Hi, just upgraded to 2.0.0 and got this in release mode on app boot:

java.lang.NullPointerException: null cannot be cast to non-null type android.view.ViewGroup
      	at com.lodev09.truesheet.TrueSheetDialog.getContainerView(TrueSheetDialog.kt:28)
      	at com.lodev09.truesheet.TrueSheetDialog.getContentView(TrueSheetDialog.kt:74)
      	at com.lodev09.truesheet.TrueSheetView.onAttachedToWindow$lambda$7(TrueSheetView.kt:181)
      	at com.lodev09.truesheet.TrueSheetView.$r8$lambda$LPseJVBVeSEffsJXW-1fD5ol-tc(Unknown Source:0)
      	at com.lodev09.truesheet.TrueSheetView$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
      	at android.os.Handler.handleCallback(Handler.java:991)
      	at android.os.Handler.dispatchMessage(Handler.java:102)
      	at android.os.Looper.loopOnce(Looper.java:232)
      	at android.os.Looper.loop(Looper.java:317)
      	at android.app.ActivityThread.main(ActivityThread.java:8787)
      	at java.lang.reflect.Method.invoke(Native Method)
      	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
      	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)

Library version

2.0.0

Environment info

info Fetching system and libraries information...
System:
OS: macOS 15.3.1
CPU: (20) arm64 Apple M1 Ultra
Memory: 401.20 MB / 64.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.18.2
path: ~/.nvm/versions/node/v20.18.2/bin/node
Yarn:
version: 4.6.0
path: /opt/homebrew/bin/yarn
npm:
version: 11.1.0
path: ~/.nvm/versions/node/v20.18.2/bin/npm
Watchman:
version: 2025.02.17.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/stathis/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK:
API Levels:
- "31"
- "33"
- "34"
- "35"
Build Tools:
- 30.0.3
- 33.0.0
- 33.0.1
- 33.0.2
- 34.0.0
- 35.0.0
System Images:
- android-25 | Google APIs ARM 64 v8a
- android-27 | Google APIs ARM 64 v8a
- android-28 | Google APIs ARM 64 v8a
- android-29 | Google APIs ARM 64 v8a
- android-30 | Google APIs ARM 64 v8a
- android-31 | Google APIs ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-35 | Pre-Release 16 KB Page Size Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23726.103.2422.13016713
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.13
path: /usr/bin/javac
Ruby:
version: 3.2.2
path: /Users/stathis/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Steps to reproduce

  1. Just upgrade to version 2.0.0 and build release.

Reproducible example repository

no-repo-sorry

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions