3rd-party Gradle plug-ins may be the cause
What fixed the issue for me:
- Change gradle plugin version to
3.1.0
- Change Kotlin version to
1.2.30
- Then Android studio changed gradle wrapper to version
4.4
- Then Android studio was saying that the build tools version used was
27.0.3
and that I should change it to27.0.3
so I also changed the target SDK to27
I added this to my gradle.build:
kapt { generateStubs = true }
I hope it helps
I restarted Android Studio and the problem disappeared.
Click File -> Invalidate Caches/Restart
Every time I change the gradle file, I must restart Android Studio to or the problem returns.
You can also try this:
Re-ordered repositories to:
mavenCentral() maven { url 'https://jitpack.io' } google() jcenter()
Clearing this folder: user's ~/.gradle/caches and deleting app build folder manually, then clean and rebuild.
To solve the issue, remove Instant App Provision
from the "Run Configurations" and leave only the Gradle-Aware Make
.
Run -> Edit Configurations..
I have AndroidStudio 3.1
, Gradle Plugin 3.1.0
and Kotlin library version 1.2.30
.