title: build failed because of "org.gradle.tooling.BuildException: invalid code lengths set"
body: <p>This error occurs whenever I try to run the app or make an apk, and I don't remember making any significant changes before this issue appeared
  here are the details </p>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <pre><code>Caused by: org.gradle.tooling.BuildException: invalid block type
  at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$2.invoke(BuildElements.kt:133)
  at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$2.invoke(BuildElements.kt:110)
  at kotlin.sequences.SequencesKt___SequencesKt$onEach$1.invoke(_Sequences.kt:1260)
  at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:149)
  at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:109)
  at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:133)
  at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:153)
  at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:633)
  at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:663)
  at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:654)
  at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.transform(BuildElements.kt:140)
  at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.into(BuildElements.kt:115)
  at com.android.build.gradle.internal.scope.BuildElementActionScheduler.into(BuildElementActionScheduler.kt:32)
  at com.android.build.gradle.tasks.PackageAndroidArtifact.doFullTaskAction(PackageAndroidArtifact.java:401)
  </code></pre>
  
  <p>There is a lot more to add, the error detail is over 35000 characters, but this website doesn't allow me to add all that.
  I'll respond soon to any things that you might want to know</p>
  
  <p>Here are the complete details of the error <a href="https://drive.google.com/file/d/1v5xZkWXORuzAUVhOl_NY2b_kBZILKrT9/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1v5xZkWXORuzAUVhOl_NY2b_kBZILKrT9/view?usp=sharing</a></p>