Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hilt +ViewBinding Cannot add a null child view to a ViewGroup #139

Open
AndroidZkx opened this issue Nov 20, 2023 · 0 comments
Open

Hilt +ViewBinding Cannot add a null child view to a ViewGroup #139

AndroidZkx opened this issue Nov 20, 2023 · 0 comments

Comments

@AndroidZkx
Copy link

2023-11-19 01:08:37
App Version: 1.1.7_117
OS Version: 10_29
Vendor: HUAWEI
Model: ELS-N39
CPU: [arm64-v8a, armeabi-v7a, armeabi]
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.moft.firefighting/com.moft.firefighting.module.main.MainActivity}: java.lang.IllegalArgumentException: Cannot add a null child view to a ViewGroup
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3898)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2462)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8393)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: java.lang.IllegalArgumentException: Cannot add a null child view to a ViewGroup
at android.view.ViewGroup.addView(ViewGroup.java:5087)
at android.view.ViewGroup.addView(ViewGroup.java:5069)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:687)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:175)
at com.moft.firefighting.lib.base.base.BaseActivity.onCreate(BaseActivity.java:45)
at com.moft.firefighting.module.main.Hilt_MainActivity.onCreate(Hilt_MainActivity.java:30)
at com.moft.firefighting.module.main.MainActivity.onCreate(MainActivity.java:36)
at android.app.Activity.performCreate(Activity.java:8121)
at android.app.Activity.performCreate(Activity.java:8109)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3871)
... 11 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant