After updating to Android Studio 3.1 I got this error message:
The project works fine and this is mostly just a warning, so my question is what\'s the meani
This happens because the Kapt annotation processor uses this directory to store Kotlin generated files. Android currently does not recognize the path by default.
See Further Details
apply plugin: 'kotlin-kapt'
add mavenCentral()
in build.gradle like:
allprojects {
repositories {
mavenCentral()
google()
jcenter() } }
Here is the some approach how I fix this issue for my case:
First of all update your android gradle plugin version from project build gradle file and then update your gradle version from gradle properties.
Finally update your kotlin version(Mandatory) to kotlin_version = '1.2.30' or later from project build gradle file.
Now try to clean your project and build. Issue should be resolved. Each time after build if you build again then probably issue will occur again so, just clean your project again and then build.
Actually,I was also facing the same error. What i did is updating my kotlin version to the latest. This may resolve Your problem.
In my case none of the above solutions solved my problem, I was using 1.2.50 Kotlin version without any mention to Instant Run, and the build wasn't generating the Dagger classes, so I find out this question that solved my issue, apparently, in my situation it's an issue related to the new Kotlin version, so I downgraded to version 1.2.41 and worked fine. By the way, I just tracked to that point because I used the Toggle View on Build screen.
1:Select the Toggle View and build your project
2:You're going to be able to see exactly what happened
Stackoverflow question: Kotlin 1.2.50 asks for baseFeatureInfoDir
Issue tracker: https://issuetracker.google.com/issues/110198434
at android studio v3.1.2 , happen Error:
Folder D:\AndroidProjects\app\build\generated\source\kaptKotlin\debug
Folder D:\AndroidProjects\app\build\generated\source\kaptKotlin\release
3rd-party Gradle plug-ins may be the cause
because dataBinding use apply plugin: 'kotlin-kapt'
so add
kapt {
generateStubs = true
}