The project gets built without error from Android Studio -> Build -> Build APKs and after installation it works fine. But running the project with a Run Configuration gives
I did below and it solved this issue:
In gradle.properties file:
android.enableAapt2=false
I disabled the Instant Run.(Important)