Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

kaptDebugKotlin task error: Unable to build the project #461

Closed
philipbrito opened this issue Mar 24, 2018 · 2 comments
Closed

kaptDebugKotlin task error: Unable to build the project #461

philipbrito opened this issue Mar 24, 2018 · 2 comments

Comments

@philipbrito
Copy link

When updating the android-ktx version to 0.2 I'm unable to build my project. The following output is show:

Error:Execution failed for task ':app:kaptDebugKotlin'.

There is no problem when using the version 0.1.

@JakeWharton
Copy link
Contributor

This library is not an annotation processor and there's not enough information to diagnose any kind of problem. Please create a standalone sample that demonstrates the problem when the core-ktx artifact version is changed from 0.1 to 0.2 and we can take a look.

@philipbrito
Copy link
Author

philipbrito commented Mar 25, 2018

@JakeWharton It was not really a library issue, but it was interesting that when working with the 0.1 version I got no problem, but when upgrading the lib to the 0.2 this issue comes on.

I have the newest JRE installed (9.0.4) and the gradle version is 4.6.
Looking on my two gradle-wrapper.properties files the distributionUrl was setted up with the distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip value, so I had to change it to distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip (see discussion here and here for more info).
When trying to build the project I got an Error:Could not initialize class com.android.sdklib.repositoryv2.AndroidSdkHandler, and to fix it I had to specify the JAVA_HOME` environment variable with the ones that is bundled with the Android Studio (more info here).

I do not know why this problem comes when the android-ktx version is updated, but I hope that the discussion here can help someone facing the same trouble.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants