androidkotlinandroid-studiobuildapk

Can't generate signed APK for release Android Studio


At first i generated an apk normally using a key store i created, it worked but when i made some changes to a layout and an activity and tried generating an apk again, an error inside a generated build file of the modified layout interrupts the build process, the file is named after the layout which is like this "LayoutNameBinding.java"

Heres a screenshot of the error source error source

Heres the output of the build build output


Solution

  • Looks like this issue is related to this post.

    Try the following:

    1. Clean project
    2. Rebuild project
    3. Invalidate caches and restart

    Hopefully, this should solve the issue.