问题
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 Error
I've already tried to Clean & Make the Project and to Clean & Rebuild the Project, with no success.
I am using Android Gradle 3.5.0 & Gradle Version 5.4.1
回答1:
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
回答2:
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.
回答3:
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
回答4:
Manually delete the build directory and rebuild, That worked for me
回答5:
I dont know why the issue was occurring but changing the
destination folder of output apk
fixed the issue.
来源:https://stackoverflow.com/questions/57646388/android-studio-3-5-cause-buildoutput-apkdata-must-not-be-null-clean-rebuild-a