SHARE
TWEET

Untitled

a guest Mar 19th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. open class SCApp : Application(), HasActivityInjector, HasServiceInjector {
  2.  
  3.     @Inject
  4.     protected lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Activity>
  5.  
  6.     @Inject
  7.     protected lateinit var dispatchingServiceInjector: DispatchingAndroidInjector<Service>
  8.  
  9.     override fun onCreate() {
  10.         super.onCreate()
  11.  
  12.         AppInjector.init(this)
  13.     }
  14.  
  15.     override fun activityInjector() = dispatchingAndroidInjector
  16.  
  17.     override fun serviceInjector() = dispatchingServiceInjector
  18. }
  19.      
  20. class IncomingLeadActivity : AppCompatActivity(), HasSupportFragmentInjector {
  21.  
  22.     lateinit var binding: ActivityIncomingLeadBinding
  23.  
  24.     private lateinit var incomingLeadViewModel: IncomingLeadViewModel
  25.  
  26.     @Inject
  27.     lateinit var viewModelFactory: ViewModelProvider.Factory
  28.  
  29.     @Inject
  30.     lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Fragment>
  31.  
  32.     override fun onCreate(savedInstanceState: Bundle?) {
  33.         super.onCreate(savedInstanceState)
  34.  
  35.         binding = DataBindingUtil.setContentView(this, R.layout.activity_incoming_lead)
  36.         incomingLeadViewModel = ViewModelProviders.of(this, viewModelFactory).get(IncomingLeadViewModel::class.java)
  37.  
  38.         binding.viewModel = incomingLeadViewModel
  39.         binding.setLifecycleOwner(this)
  40.  
  41.         supportFragmentManager
  42.             .beginTransaction()
  43.             .replace(android.R.id.content, LeadReceiverFragment.newInstance(), "")
  44.             .commit()
  45.     }
  46.  
  47.     override fun supportFragmentInjector() = dispatchingAndroidInjector
  48. }
  49.      
  50. class LeadReceiverFragment : Fragment(), Injectable {
  51.  
  52.     lateinit var binding: LeadReceiverFragmentBinding
  53.  
  54.     @Inject
  55.     lateinit var viewModelFactory: ViewModelProvider.Factory
  56.  
  57.     private lateinit var leadReceiverViewModel: LeadReceiverViewModel
  58.  
  59.     companion object {
  60.         fun newInstance() = LeadReceiverFragment()
  61.     }
  62.  
  63.     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
  64.         binding = DataBindingUtil.inflate(
  65.             inflater,
  66.             R.layout.lead_receiver_fragment,
  67.             container,
  68.             false
  69.         )
  70.         return binding.root
  71.     }
  72.  
  73.     override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
  74.         leadReceiverViewModel = ViewModelProviders.of(this, viewModelFactory).get(LeadReceiverViewModel::class.java)
  75.         binding.setLifecycleOwner(viewLifecycleOwner)
  76.  
  77.         binding.viewModel = leadReceiverViewModel
  78.     }
  79. }
  80.      
  81. * Exception is:
  82. org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:kaptDebugKotlin'.
  83.         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
  84.         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
  85.         at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
  86.         at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
  87.         at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
  88.         at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
  89.         at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
  90.         at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
  91.         at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
  92.         at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
  93.         at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
  94.         at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
  95.         at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
  96.         at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
  97.         at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
  98.         at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
  99.         at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
  100.         at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
  101.         at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
  102.         at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
  103.         at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
  104.         at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
  105.         at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
  106.         at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
  107.         at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
  108.         at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
  109.         at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
  110.         at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
  111.         at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
  112.         at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
  113.         at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
  114.         at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
  115. Caused by: org.gradle.api.GradleException: Internal compiler error. See log for more details
  116.         at org.jetbrains.kotlin.gradle.tasks.TasksUtilsKt.throwGradleExceptionIfError(tasksUtils.kt:15)
  117.         at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:135)
  118.         at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runCompilerAsync(GradleKotlinCompilerRunner.kt:152)
  119.         at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runCompilerAsync(GradleKotlinCompilerRunner.kt:147)
  120.         at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJvmCompilerAsync(GradleKotlinCompilerRunner.kt:87)
  121.         at org.jetbrains.kotlin.gradle.internal.KaptWithKotlincTask.compile(KaptWithKotlincTask.kt:72)
  122.         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  123.         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  124.         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  125.         at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
  126.         at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
  127.         at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
  128.         at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
  129.         at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
  130.         at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:768)
  131.         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
  132.         at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
  133.         at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
  134.         at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
  135.         at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
  136.         at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
  137.         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
  138.         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
  139.         ... 31 more
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top