Execution failed for task ':app:kaptDebugKotlin'. Null value provided in parameters - android
I have this error, when I try to compile my project.
Execution failed for task ':app:kaptDebugKotlin'.
> There was a failure while executing work items
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> Could not create an instance of type org.jetbrains.kotlin.gradle.internal.KaptExecution.
> Null value provided in parameters [KaptOptionsForWorker(projectBaseDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app, compileClasspath=[/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/overdriveDebug/R.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/577f778e878f5eb06c4a655444e9ee5b/jetified-telmate.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/1f4cf1e79d49f7ad90a29a218634ca3a/databinding-adapters-4.2.2-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/0e2376746a3465ea4f3d2c464cc7334c/databinding-runtime-4.2.2-api.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.databinding/databinding-common/4.2.2/9cc81874c48238769c25dc40d122d4ed37d570e2/databinding-common-4.2.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/99bbb22992116ab4bd41ca4b5a617d5d/jetified-kotlin-android-extensions-runtime-1.3.21.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/a7aecd107a14f481a25de4582d0a602b/jetified-kotlin-stdlib-jdk7-1.3.61.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/901a4d379b16e00c1ed6deb86a546c79/appcompat-1.1.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/f688e20aa1814f4cef0c272681748b26/jetified-core-ktx-1.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/a981ad730e75c1574a57bbe8edda9cb5/constraintlayout-1.1.3-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/062cab76c8ef1f6a33c9b8c006b0595d/jetified-kotlinx-coroutines-android-1.1.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/425afa4f4e4c39e19fce874c454a5ef2/jetified-timber-4.7.1-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/540d1e0e6d9fb829fa63ee235dc53527/jetified-converter-moshi-2.7.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/72b1fef61f1b98eb78c243ee3c5d1732/jetified-retrofit2-kotlin-coroutines-adapter-0.9.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/fd5edcb07c435227c51a746195f815db/jetified-retrofit-2.7.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/0e4b7ce9cdb5093ce17c54e029a84d00/jetified-moshi-kotlin-1.9.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/ce7fce3380e8219a5ab1ddb386adc191/jetified-moshi-1.9.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/ee4bdc77df2ce3fba54c4af800ef1f82/jetified-logging-interceptor-4.4.0.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/759060d1d0980180d304b88a3e3dce19/lifecycle-extensions-2.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/46cf0e80db56bde8bb84c2851f98af99/jetified-viewbinding-4.2.2-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/a93ad07ad33b80364c3e182c4891a2b1/fragment-1.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/5bdab271bddd092451a04bde591935bb/jetified-appcompat-resources-1.1.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/257bec523ecc09965249ecb8549231a0/drawerlayout-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/508e993e3d50f9c4eb11eeebeb7acdf9/viewpager-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/2e248f56d47a4cc29b83d1cbc89189fd/loader-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/c03b5d2c44837b67dc2c4a3e744e7deb/jetified-activity-1.1.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/1ce7269bd7803aef6969c6a80534aa6d/vectordrawable-animated-1.1.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/114e12240e6b06b1d6300ebdccef43a6/vectordrawable-1.1.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/e6300bce99efe5c93e1e123f6300afd1/customview-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/22385120ecb1b76e23f439609e62958e/core-1.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/4be18dbd8044346daeb5ead3716fd312/jetified-lifecycle-process-2.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/6a47d38aeb627719ecb5fabd70e7c10d/jetified-lifecycle-service-2.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/212a32460182c9bb7fc3e7493d7051ba/lifecycle-runtime-2.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/a261a24cf076c8f9291a830644216933/versionedparcelable-1.1.0-api.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.collection/collection/1.1.0/1f27220b47669781457de0d600849a5de0e89909/collection-1.1.0.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/a70664eed8d0d904e972bbafaf0480fc/cursoradapter-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/e0ee4095d7d30a275216a9b0a79aaa4f/lifecycle-livedata-2.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/491844973607369da3371fad21cdea60/jetified-lifecycle-viewmodel-savedstate-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/65baeab18521e457e6fd3b14fc90aae2/lifecycle-livedata-core-2.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/d1e7754fa009747392683652d01fdbe8/core-runtime-2.1.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/ba5e7e8b69b9631b358da336391749c4/jetified-savedstate-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.arch.core/core-common/2.1.0/b3152fc64428c9354344bd89848ecddc09b6f07e/core-common-2.1.0.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common/2.2.0/4ef09a745007778eef83b92f8f23987a8ea59496/lifecycle-common-2.2.0.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/b4edf0407c4e4e337f9ac18cd2c4bcb9/lifecycle-viewmodel-2.2.0-api.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/60bc8c4e5626ff516a234e9abd162bae/interpolator-1.0.0-api.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.1.0/e3a6fb2f40e3a3842e6b7472628ba4ce416ea4c8/annotation-1.1.0.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/1494ddb749a0613b1cfe5353a9a864e3/jetified-kotlinx-coroutines-core-1.1.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/122358145c6c5f5cf29bba71ccdfac5d/jetified-okhttp-4.4.0.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/bf7c7f5feb1bdfa4a51ec600711a02bf/jetified-okio-jvm-2.4.3.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/279fe3b6c28e75fce9792d58a5ceb68d/jetified-kotlin-reflect-1.3.50.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/638b66c05ac67e83743426e606ba7b24/jetified-kotlin-stdlib-1.3.61.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/03e82d6b38351103eca59bf520d51180/jetified-kotlinx-coroutines-core-common-1.1.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/72776d5c2d95139d643f2914777662b3/jetified-kotlin-stdlib-common-1.3.61.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/47e8a7b5dd61b2f91fe6c3c05a4d0817/jetified-annotations-16.0.1.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.constraintlayout/constraintlayout-solver/1.1.3/54abe9ffb22cc9019b0b6fcc10f185cc4e67b34e/constraintlayout-solver-1.1.3.jar, /Users/nicolas.machado/Library/Android/sdk/platforms/android-29/android.jar, /Users/nicolas.machado/Library/Android/sdk/build-tools/30.0.2/core-lambda-stubs.jar], javaSourceRoots=[/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/generated/source/buildConfig/overdrive/debug, /Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/generated/data_binding_trigger/overdriveDebug, /Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/generated/source/kaptKotlin/overdriveDebug, /Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/tmp/kapt3/stubs/overdriveDebug, /Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/generated/data_binding_base_class_source_out/overdriveDebug/out, /Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/src/main/java], sourcesOutputDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/generated/source/kapt/overdriveDebug, classesOutputDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/tmp/kapt3/classes/overdriveDebug, stubsOutputDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/tmp/kapt3/stubs/overdriveDebug, processingClasspath=[/Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.databinding/databinding-compiler/4.2.2/cec2ea3966520f89e7728bab98430d3097dbc4d6/databinding-compiler-4.2.2.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.databinding/databinding-compiler-common/4.2.2/eb4a4be28f072f8277181f69756f94433404d386/databinding-compiler-common-4.2.2.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/androidx.databinding/databinding-common/4.2.2/9cc81874c48238769c25dc40d122d4ed37d570e2/databinding-common-4.2.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/49df1ea60e5552841c8f303a38805124/jetified-kotlin-stdlib-jdk8-1.4.31.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/f4967c44cf91a29320dfe08e0a053b6f/jetified-auto-common-0.10.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/5fd8c583e197cfff50948772e5d4a65d/jetified-commons-io-2.4.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/97d5c70db0c919501a7a51c099ad71e2/jetified-commons-codec-1.10.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/07b044e94abb98b233bcf19f023aa18b/jetified-antlr4-4.5.3.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/70652ad621eb3ee00e7814e5e279f847/jetified-juniversalchardet-1.0.3.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/com.android.databinding/baseLibrary/4.2.2/f4b28ef5d283a9288e794829a2a890746cc5a714/baseLibrary-4.2.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/d534cae71506099d05531b01b1bf312a/jetified-guava-28.1-jre.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/cf50cee83ec2c22596b318d519dd4440/jetified-javapoet-1.10.0.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/com.android.tools.build.jetifier/jetifier-core/1.0.0-beta09/c98ee0e5579aed97e17f605a89b101115a2f5a61/jetifier-core-1.0.0-beta09.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/42aff68a3d6cd6bf88ae5975c53f3445/jetified-gson-2.8.6.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/d843b8bd248b2d82db8d09a3434d4d7e/jetified-jaxb-runtime-2.3.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/b6575188e0028687b792b5e85479b957/jetified-annotations-27.2.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/0671277c3fa333ea04c2f757b89577be/jetified-kotlin-stdlib-jdk7-1.4.31.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/eb7ec373ea4877d11c430ab7549b3430/jetified-kotlin-stdlib-1.4.31.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/dd57f5329056c53033bd14130b8cb48c/jetified-failureaccess-1.0.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/9fa6b92b6c663d837f7e4bb4aa1abcf8/jetified-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/dfcef1f0ef848df42892e5d2d9b20551/jetified-jsr305-3.0.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/656e89b4ad018b300fadd303cfe41ed9/jetified-checker-qual-2.8.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/86fea5188159bbc8d122b4212652c9a3/jetified-error_prone_annotations-2.3.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/59b5a67c962816ba109c8627bb0c7f6d/jetified-j2objc-annotations-1.3.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/26fdb5eb30c492727a08e18e1a6ad643/jetified-animal-sniffer-annotations-1.18.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/ce77258e5cbfee476423ee9ad70f9394/jetified-stax-ex-1.8.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/ab18bd78b7deb6358ae9b54ea8219cae/jetified-jakarta.xml.bind-api-2.3.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/604e978716376b72bdf1d534e5466648/jetified-txw2-2.3.2.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/0605654c358ab6ac3af830562b0750d1/jetified-istack-commons-runtime-3.0.8.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/842fa97326d4307fbdf7e95684db5633/jetified-FastInfoset-1.2.16.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/cad6a9bf2fc98452c9b989b66de58a89/jetified-jakarta.activation-api-1.2.1.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/d495e9feb962cc5182906481f48aa471/jetified-kotlin-stdlib-common-1.4.31.jar, /Users/nicolas.machado/.gradle/caches/transforms-2/files-2.1/8aec37d3d61d7667d72c1f1d48873458/jetified-annotations-13.0.jar], processors=[], processingOptions={kapt.kotlin.generated=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/generated/source/kaptKotlin/overdriveDebug, android.databinding.minApi=21=, android.databinding.classLogDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/intermediates/data_binding_base_class_log_artifact/overdriveDebug/out=, android.databinding.aarOutDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/intermediates/data_binding_artifact/overdriveDebug/kaptOverdriveDebugKotlin=, android.databinding.enableDebugLogs=0=, android.databinding.dependencyArtifactsDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/intermediates/data_binding_dependency_artifacts/overdriveDebug=, android.databinding.sdkDir=/Users/nicolas.machado/Library/Android/sdk=, android.databinding.enableForTests=0=, android.databinding.enableV2=1=, android.databinding.modulePackage=net.gtl.gtlodrive=, android.databinding.artifactType=APPLICATION=, android.databinding.isTestVariant=0=, android.databinding.incremental=1=, android.databinding.printEncodedErrorLogs=1=, android.databinding.layoutInfoDir=/Users/nicolas.machado/development/gtl/aosp-apps/gtl-overdrive/app/build/intermediates/data_binding_layout_info_type_merge/overdriveDebug/out=}, javacOptions={}, flags=[INCLUDE_COMPILE_CLASSPATH]), null, [/Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-annotation-processing-gradle/1.3.21/225aacd70ddfe71c72796bb317b3f12254c1ff3a/kotlin-annotation-processing-gradle-1.3.21.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.3.21/677cc9553b8964c895abc76da9b6a0faea8f671d/kotlin-compiler-embeddable-1.3.21.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.3.21/d0d5ff2ac2ebd8a42697af41e20fc225a23c5d3b/kotlin-reflect-1.3.21.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.21/4bcc2012b84840e19e1e28074284cac908be0295/kotlin-stdlib-1.3.21.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.21/f30e4a9897913e53d778f564110bafa1fef46643/kotlin-stdlib-common-1.3.21.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.3.21/29363d474ee6fda354900636320a177c7286def9/kotlin-script-runtime-1.3.21.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.intellij.deps/trove4j/1.0.20181211/216c2e14b070f334479d800987affe4054cd563f/trove4j-1.0.20181211.jar, /Users/nicolas.machado/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.31/a58e0fb9812a6a93ca24b5da75e4b5a0cb89c957/kotlin-stdlib-1.4.31.jar]]
This is the famous error when you have some discrepancies between libraries in gradle , I think.
I think that the key is here:
Null value provided in parameters
This project was written 2 years ago, and I don't know what ide version was used.
But, for example, it uses DataBinding, and this was the original gradle config:
dataBinding {
enabled = true
}
And I changed to:
buildFeatures {
dataBinding true
}
But of course, the problem persists.
I upgraded Gradle Plugin from 4.1.3 -> 4.2.2
and Gradle Version from 6.5 -> 6.7.1
But I'm still getting the error.
How d I know what kapt android plugin is using?
What is the origin of the error ?
Note: I edited some lines here because the project has flavors. And I don't want to confuse you.
Best regards
Related
ktLintFormat fails with an error: Process 'command '/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home/bin/java'' (macOS w/ Apple M1 chip)
Installed ktLint on my Android Studio project but when running I get the following error: Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at com.pinterest.ktlint.KtlintCommandLine.parallel(Main.kt:576) at com.pinterest.ktlint.KtlintCommandLine.parallel$default(Main.kt:548) at com.pinterest.ktlint.KtlintCommandLine.lintFiles(Main.kt:298) at com.pinterest.ktlint.KtlintCommandLine.run(Main.kt:262) at com.pinterest.ktlint.Main.main(Main.kt:70) Caused by: java.lang.ExceptionInInitializerError at org.jetbrains.kotlin.com.intellij.util.exception.FrequentErrorLogger.report(FrequentErrorLogger.java:46) at org.jetbrains.kotlin.com.intellij.util.exception.FrequentErrorLogger.info(FrequentErrorLogger.java:42) at org.jetbrains.kotlin.com.intellij.psi.impl.DebugUtil.handleUnspecifiedTrace(DebugUtil.java:626) at org.jetbrains.kotlin.com.intellij.psi.impl.DebugUtil.currentInvalidationTrace(DebugUtil.java:618) at org.jetbrains.kotlin.com.intellij.psi.impl.DebugUtil.calcInvalidationTrace(DebugUtil.java:612) at org.jetbrains.kotlin.com.intellij.psi.impl.DebugUtil.onInvalidated(DebugUtil.java:583) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.TreeElement.onInvalidated(TreeElement.java:226) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.TreeElement.rawRemoveUpToWithoutNotifications(TreeElement.java:388) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.TreeElement.rawRemoveUpTo(TreeElement.java:342) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.CompositeElement.remove(CompositeElement.java:775) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.CompositeElement.lambda$removeChildrenInner$4(CompositeElement.java:797) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.ChangeUtil$1.runInner(ChangeUtil.java:149) at org.jetbrains.kotlin.com.intellij.pom.impl.PomTransactionBase.run(PomTransactionBase.java:46) at com.pinterest.ktlint.core.internal.FormatPomModel.runTransaction(KotlinPsiFileFactory.kt:121) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.ChangeUtil.prepareAndRunChangeAction(ChangeUtil.java:143) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.CompositeElement.removeChildrenInner(CompositeElement.java:796) at org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.CompositeElement.replaceChild(CompositeElement.java:623) at org.jetbrains.kotlin.com.intellij.psi.impl.source.codeStyle.CodeEditUtil.replaceChild(CodeEditUtil.java:162) at org.jetbrains.kotlin.com.intellij.extapi.psi.ASTDelegatePsiElement.replaceChildInternal(ASTDelegatePsiElement.java:385) at org.jetbrains.kotlin.com.intellij.extapi.psi.ASTDelegatePsiElement.replace(ASTDelegatePsiElement.java:375) at org.jetbrains.kotlin.psi.KtExpressionImplStub.rawReplace(KtExpressionImplStub.java:48) at org.jetbrains.kotlin.psi.KtExpressionImpl$Companion.replaceExpression(KtExpressionImpl.kt:53) at org.jetbrains.kotlin.psi.KtExpressionImplStub.replace(KtExpressionImplStub.java:43) at com.pinterest.ktlint.ruleset.standard.StringTemplateRule.visit(StringTemplateRule.kt:49) at com.pinterest.ktlint.core.KtLint$format$1.invoke(KtLint.kt:389) at com.pinterest.ktlint.core.KtLint$format$1.invoke(KtLint.kt:382) at com.pinterest.ktlint.core.KtLint$visitor$2$2.invoke(KtLint.kt:313) at com.pinterest.ktlint.core.KtLint$visitor$2$2.invoke(KtLint.kt:312) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:229) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.ast.PackageKt.visit(package.kt:230) at com.pinterest.ktlint.core.KtLint$visitor$2.invoke(KtLint.kt:312) at com.pinterest.ktlint.core.KtLint$visitor$2.invoke(KtLint.kt:300) at com.pinterest.ktlint.core.KtLint.format(KtLint.kt:382) at com.pinterest.ktlint.internal.FileUtilsKt.formatFile(FileUtils.kt:202) at com.pinterest.ktlint.KtlintCommandLine.process(Main.kt:366) at com.pinterest.ktlint.KtlintCommandLine.access$process(Main.kt:89) at com.pinterest.ktlint.KtlintCommandLine$lintFiles$3.invoke$lambda-0(Main.kt:289) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private transient java.lang.Object java.lang.Throwable.backtrace accessible: module java.base does not "opens java.lang" to unnamed module #fe48b45 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) at org.jetbrains.kotlin.com.intellij.util.ReflectionUtil.findFieldInHierarchy(ReflectionUtil.java:153) at org.jetbrains.kotlin.com.intellij.util.ReflectionUtil.getDeclaredField(ReflectionUtil.java:278) at org.jetbrains.kotlin.com.intellij.openapi.util.objectTree.ThrowableInterner.<clinit>(ThrowableInterner.java:81) ... 50 more > Task :app:ktlintFormat FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:ktlintFormat'. > Process 'command '/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 I'v found some places talking about a wrong version of Java installed to satisfy ktLint, but it's from last year and I'mm already using a newer version of Java the what was suggested. F.eks. this thread: https://githubmemory.com/repo/pinterest/ktlint/issues/1227 Here is my ktLint.gradle file which is quite standard: configurations { ktlint } dependencies { ktlint "com.pinterest:ktlint:0.43.2" } task ktlint(type: JavaExec, group: "verification") { description = "Check Kotlin code style." classpath = configurations.ktlint main = "com.pinterest.ktlint.Main" ignoreExitValue = true // create html report for CI and plain report for terminal report args "--android", "--color", "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/reports/ktlint-results.xml", "src/**/*.kt" } task ktlintFormat(type: JavaExec, group: "formatting") { description = "Fix Kotlin code style deviations." classpath = configurations.ktlint main = "com.pinterest.ktlint.Main" args "-F", "src/**/*.kt" jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED") } And the Java version: java version "17.0.1" 2021-10-19 LTS Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39) Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing) Hardware: macOS Monterey 12.0.1 Apple M1 chip Gradle 7.3.3
Configure your ktlintFormat task to include jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED"), works for me with with JDK 17.0.1. Source: https://github.com/pinterest/ktlint/issues/1195
Jacoco: IllegalStateException: Can't add different class with same name
I am trying to generate Jacoco XML reports for this Android project. I am using the gradle-android-junit-jacoco-plugin version 0.16.0 (latest as of today). When I run the jacocoTestReportMerged task it fails with the following error: Caused by: java.io.IOException: Error while analyzing XmlPullParsers.class. at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:170) at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:142) at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:165) at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:201) at org.jacoco.ant.ReportTask.createBundle(ReportTask.java:570) at org.jacoco.ant.ReportTask.createReport(ReportTask.java:542) at org.jacoco.ant.ReportTask.execute(ReportTask.java:495) ... 210 more Caused by: java.lang.IllegalStateException: Can't add different class with same name: info/metadude/android/eventfahrplan/network/serialization/XmlPullParsers at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:107) at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:98) at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:338) at org.jacoco.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:98) at org.objectweb.asm.ClassReader.accept(ClassReader.java:683) at org.objectweb.asm.ClassReader.accept(ClassReader.java:391) at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:124) at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:140) ... 215 more I started configuring exclude rules such as ... junitJacoco { excludes = [ "**/XmlPullParsers.*" ] } ... but then the task fails at the next file - so this does not seem to be the correct way. I also tried 0.17.0-SNAPSHOT and version prior to 0.16.0, without success though. Gradle 6.3 is used in this project. How can I configure the Gradle plugin for my project?
Error:Execution failed for task: Unable to merge dex
I got this error out of nowhere Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDev'. com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex I already tried adding multiDexEnabled: true to my default Config, and other combinations of suggested changes related to this problem like implementing implementation 'com.android.support:multidex:1.0.3' implementation 'android.arch.lifecycle:extensions:1.1.0' also I've cleaned and built a lot I am also getting this on my logcat: 03-12 10:30:06.685 2425-4917/? E/LocSvc_libulp: E/int ulp_brain_transition_all_providers(), no QUIPC/GNSS transition logic run due to both engines are OFF 03-12 10:30:06.687 2425-4047/? E/QMI_FW: QCCI qmi_cci_xport_recv: txn not found. svc_id: 16 03-12 10:30:06.687 2425-3969/? E/LocSvc_LBSApiV02: E/virtual int lbs_core::LBSApiV02::injectCoarsePosition(const CoarsePositionInfo &):353]: Error : st = 3, ind.status = 0 03-12 10:30:09.281 808-808/? E/cnss-daemon: Stale or unreachable neighbors, ndm state: 32 Let me know how I can improve this question, Thanks
Basically I had a duplicade Implementation on my gradle file, so removing one of those solved the issue.
Android DataBinding increases Compilation time
After using DataBinding in my project, it increases the compilation time by almost 3 time. Anyone experienced this issue and any one have solution to this issue android { .... dataBinding { enabled = true } } here is the Gradle Process, Gradle console output should be something like this (produced also without Data Binding dependency), where most tasks show "UP-TO-DATE": Executing tasks: [:app:assembleDebug] Configuration on demand is an incubating feature.:app:preBuild UP-TO-DATE Launcher 30m34.33s (total) :Launcher:crashlyticsUploadRelease 3m48.28s :Launcher:crashlyticsUploadRelease 3m47.65s :Launcher:crashlyticsUploadRelease 3m47.36s :Launcher:transformClassesAndResourcesWithProguardForRelease 2m10.91s :Launcher:transformClassesAndResourcesWithProguardForRelease 1m15.67s :Launcher:mergeHDebugResources 1m14.40s :Launcher:transformClassesWithDexForDebug 1m11.57s :Launcher:transformClassesWithMultidexlistForDebug 50.019s :Launcher:transformClassesAndResourcesWithProguardForRelease 45.933s :Launcher:transformClassesWithDexForDebug 44.197s :Launcher:mergeReleaseResources 42.840s :Launcher:transformClassesWithDexForRelease 39.647s :Launcher:transformClassesWithDexForDebug 37.544s :Launcher:transformClassesWithMultidexlistForDebug 35.999s :Launcher:compileReleaseJavaWithJavac 30.436s :Launcher:compileDebugJavaWithJavac 30.246s :Launcher:mergeDebugResources 27.041s :Launcher:compileReleaseJavaWithJavac 26.340s :Launcher:mergeReleaseResources 26.216s :Launcher:transformClassesWithDexForRelease 21.634s :Launcher:compileReleaseJavaWithJavac 20.928s :Launcher:transformClassesWithDexForRelease 20.263s :Launcher:transformClassesWithMultidexlistForDebug 17.442s :Launcher:compileDebugJavaWithJavac 16.619s :Launcher:mergeReleaseResources 13.947s :Launcher:dataBindingProcessLayoutsDebug 55.383s :Launcher:clean 13.641s
GAE Endpoints gradle build error while generating classes
Gradle build fails on appengineEndpointsExportClientLibs task with the following stacktrace. I can run the backend module but I can't update any backend classes and see the change. org.gradle.api.tasks.TaskValidationException: A problem was found with the configuration of task ':backend:appengineEndpointsExportClientLibs'. at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) Caused by: org.gradle.api.InvalidUserDataException: No value has been specified for property 'clientLibJarOut'. at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:47) ... 51 more