I am trying to build my project in Kotlin and I am getting this error:
Execution failed for task ':app:generateSafeArgsDebug'.
Could not read 'F:\Program Files\Android Projects\CityOnApp\crowdapps-mobile-android\app\build\intermediates\metadata_application_id\debug\application-id.txt' as it does not exist.
and when I added in Settings > Build, Execution, Deployment > Compiler > Command Line Options : --stacktrace --debug -Pandroid.debug.obsoleteApi=true, then I got : [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:generateSafeArgsDebug'.
Could not read 'F:\Program Files\Android Projects\CityOnApp\crowdapps-mobile-android\app\build\intermediates\metadata_application_id\debug\application-id.txt' as it does not exist.
I checked the path and the file does not exist there! I have the latest version in Kotlin and Android Studio. What I tried and did not work is :
- clean build and rebuild/ build
- downgrading the version of Android Studio
- deleting the .gradle file from the root directory