3rd-party Gradle plug-ins may be the cause

后端 未结 17 833
悲哀的现实
悲哀的现实 2020-12-07 12:00

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

相关标签:
17条回答
  • 2020-12-07 12:16

    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

    0 讨论(0)
  • 2020-12-07 12:19
    1. remove apply plugin: 'kotlin-kapt'
    2. add mavenCentral() in build.gradle like:

      allprojects { repositories { mavenCentral() google() jcenter() } }

    3. Sync and Clean project
    0 讨论(0)
  • 2020-12-07 12:24

    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.

    0 讨论(0)
  • 2020-12-07 12:28

    Actually,I was also facing the same error. What i did is updating my kotlin version to the latest. This may resolve Your problem.

    0 讨论(0)
  • 2020-12-07 12:29

    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

    0 讨论(0)
  • 2020-12-07 12:30

    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
    }
    
    1. Change gradle plugin version to 3.1.2
    2. Change Kotlin version to 1.2.30
    3. Then Android studio changed gradle wrapper to version 4.4
    4. Then Android studio was saying that the build tools version used was 27.1.1 and that I should change it to 27.1.1 so I also changed the target SDK to 27
    0 讨论(0)
提交回复
热议问题