pantasystem / Milktea

Misskey, MastodonのAndroidクライアント「Milktea」のソースコード
GNU General Public License v3.0
256 stars 22 forks source link

ユーザー名で検索するとクラッシュする #410

Closed pantasystem closed 2 years ago

pantasystem commented 2 years ago

java.lang.IllegalStateException: Hilt Fragments must be attached to an @AndroidEntryPoint Activity. Found: class jp.panta.misskeyandroidclient.SearchResultActivity at dagger.hilt.internal.Preconditions.checkState(Preconditions.java:83) at dagger.hilt.android.internal.managers.FragmentComponentManager.createComponent(FragmentComponentManager.java:75) at dagger.hilt.android.internal.managers.FragmentComponentManager.generatedComponent(FragmentComponentManager.java:64) at jp.panta.misskeyandroidclient.ui.users.Hilt_SearchUserFragment.generatedComponent(Hilt_SearchUserFragment.java:88) at jp.panta.misskeyandroidclient.ui.users.Hilt_SearchUserFragment.inject(Hilt_SearchUserFragment.java:110) at jp.panta.misskeyandroidclient.ui.users.Hilt_SearchUserFragment.onAttach(Hilt_SearchUserFragment.java:60) at androidx.fragment.app.Fragment.onAttach(Fragment.java:1827) at jp.panta.misskeyandroidclient.ui.users.Hilt_SearchUserFragment.onAttach(Hilt_SearchUserFragment.java:47) at androidx.fragment.app.Fragment.performAttach(Fragment.java:2954) at androidx.fragment.app.FragmentStateManager.attach(FragmentStateManager.java:463) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:254) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1840) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1758) at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1670) at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:323) at androidx.fragment.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:274) at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1244) at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092) at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622) at android.view.View.measure(View.java:24869) at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(ConstraintLayout.java:811) at androidx.constraintlayout.core.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:632) at androidx.constraintlayout.core.widgets.analyzer.Direct.verticalSolvingPass(Direct.java:452) at androidx.constraintlayout.core.widgets.analyzer.Direct.solveVerticalMatchConstraint(Direct.java:750) at androidx.constraintlayout.core.widgets.analyzer.Direct.verticalSolvingPass(Direct.java:551) at androidx.constraintlayout.core.widgets.analyzer.Direct.verticalSolvingPass(Direct.java:537) at androidx.constraintlayout.core.widgets.analyzer.Direct.verticalSolvingPass(Direct.java:486) at androidx.constraintlayout.core.widgets.analyzer.Direct.solvingPass(Direct.java:224) at androidx.constraintlayout.core.widgets.ConstraintWidgetContainer.layout(ConstraintWidgetContainer.java:693) at androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.solveLinearSystem(BasicMeasure.java:160) at androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.solverMeasure(BasicMeasure.java:291) at androidx.constraintlayout.core.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:120) at androidx.constraintlayout.widget.ConstraintLayout.resolveSystem(ConstraintLayout.java:1594) at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1708) at android.view.View.measure(View.java:24869) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6893) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:145) at android.view.View.measure(View.java:24869) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6893) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552) at android.widget.LinearLayout.measureVertical(LinearLayout.java:842) at android.widget.LinearLayout.onMeasure(LinearLayout.java:721) at android.view.View.measure(View.java:24869) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6893) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:24869) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6893) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552) at android.widget.LinearLayout.measureVertical(LinearLayout.java:842) at android.widget.LinearLayout.onMeasure(LinearLayout.java:721) at android.view.View.measure(View.java:24869) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6893) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.DecorView.onMeasure(DecorView.java:775) at android.view.View.measure(View.java:24869) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3092) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1906) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2200) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1794) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7756) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1031) at android.view.Choreographer.doCallbacks(Choreographer.java:854) at android.view.Choreographer.doFrame(Choreographer.java:789) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1016) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7560) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

pantasystem commented 2 years ago

@AndroidEntryPointアノテーションをつけ忘れていたことが原因だった 問題は既に修正されていた。