Android studio keeps telling me that the build has failed. I am not using Kotlin and all my code is in JAVA. I keep getting this error ONLY when i want to build/run the project. I always need to delete .gradle folder and restart Android studio to get this working again. It's not an IDE issue i feel as I have used both IDE version 3.1 and 3.3. I have also updated Kotlin to the latest version currently 1.2.70
* What went wrong:
A problem occurred configuring project ':app'.
> Could not create task ':app:processProdDebugManifest'.
> java.lang.IllegalAccessException: Class kotlin.reflect.jvm.internal.FunctionCaller$FieldSetter can not access a member of class com.android.build.gradle.tasks.ManifestProcessorTask with modifiers "private"
ext.kotlin_version = "1.2.70"
After a complete restart and invalidating cache the build succeeds, but after any new changes i make it cant build again until i restart the entire IDE and delete the .gradle folder
here are my root Project version numbers
ext {
// SDK and tools
minSDK = 18
targetSDK = 28
compileSDK = 28
buildTools = '28.0.2'
// SUPPORT LIBRARY
SupportLibrary = '28.0.0-rc02'
// Debug the App
debugMode = true
minify = true
proguard = false
multidex = false
// App Versioning
versionCode = 7
versionName = 0.7
}