Cause: buildOutput.apkData must not be null
Click Build
-> Clean Project
Then Build
-> Make Project
Tested on gradle 3.5.0-alpha3, -alpha5 and 3.4.0 (project gradle)
classpath 'com.android.tools.build:gradle:3.5.0-alpha03'
For Android Studio 3.5 & 3.6 Update (APK signed issue)
Step 1: I have resolved this issue by modifying the Destination Folder location.
Before
c:\user\folder\project\app
After
c:\user\folder\project\apk
> **For Android Studio `3.4` Update.**
Step 1: After update Android Studio 3.4 you need to add all the dependency that used in your module or library in your app-level build.gradle
.
Step 2: Clean Project(Build > Clean Project)
Step 3: Rebuild Project(Build > Rebuild Project)
Now, Your Project will compile Perfectly.
FOR Android Studio 3.5 | 3.6
debug builds finish without any error. Creating a signed .apk leads to the same error
buildOutput.apkData must not be null
the Simple solution that I found is. During the signing of the apk after entering the signing credentials when you navigate to the next screen then it will ask for the destination folder just change the default path.
Let's assume the current destination path is
c:\user\folder\project\app
change it to
c:\user\folder\project\
then it will generate the signed apk successfully.