After I\'ve updated Android Studio 3.4 to 3.5 and wanted to build a Signed APK, however I get the error :
Cause: buildOutput.apkData must not be null Erro
option 1 - change the destination folder of the apk generated and generate apk again.
option 2 - delete the output.json file under release folder and generate apk again.
It solved my problem. I hope it will help you too.
I dont know why the issue was occurring but changing the
destination folder of output apk
fixed the issue.
Manually delete the build directory and rebuild, That worked for me
It's working on AS 3.4.2 version. I've tried everything (Clean & Make the Project and to Clean & Rebuild) and downgraded to 3.4.2 at last.
This issue might be fixed in the 3.6 release. https://androidstudio.googleblog.com/2019/07/android-studio-36-canary-5-available.html
Delete the contents of the build folders (existing *.apk and output.json):-
And then rebuild the system by:-
File -> Sync Project with Gradle Files
This issue happens after update my Android studio v3.4 to v3.5 Now, it is working fine
I fixed this issue by deleting debug/output.json and release/output.json files
otherwise change your apk destination folder path.
Android Studio 3.5
compilesdkVersion 28
apk generating working