Joshua McWilliams
07/13/2020, 2:25 PMExecution failed for task ‘appkaptDebugKotlin’.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)Any ideas how to get Dagger to place nice with Compose? Fragment Code:
class HomeFragment : Fragment() {
@Inject
lateinit var viewModelFactory: ViewModelFactory
private val vm: HomeViewModel by viewModels { viewModelFactory }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
AndroidSupportInjection.inject(this)
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val fragmentView = inflater.inflate(R.layout.compose_container, container, false)
(fragmentView as ViewGroup).setContent {
LetsComposeTheme {
HomeTabContent()
}
}
return fragmentView
}
}
@Composable
fun HomeTabContent() {
VerticalScroller {
drawSectionCard(createSections())
}
}
Adam Powell
07/13/2020, 7:55 PMcb
07/13/2020, 7:56 PMlateinit
Adam Powell
07/13/2020, 7:58 PM