Cause: buildOutput.apkData must not be null

后端 未结 28 1456
再見小時候
再見小時候 2020-12-07 12:03

My android application using Kotlin is throwing this exception when I try to Run \'app\' in the emulator o in my cellphone. When I build my project it runs well, with no err

相关标签:
28条回答
  • 2020-12-07 12:15

    I tried above multiple solutions but nothing has happened then I found this this and worked for me

        deleting debug/output.json and release/output.json solved my problem
    

    Now I am able to generate apk

    0 讨论(0)
  • 2020-12-07 12:15

    Usually this issue happen on updating android Studio V3.4 to V3.5. Try to delete debug/output.json and release/output.json files.

    Then Try these steps:

    Step 1: Clean Project(Build > Clean Project)

    Step 2: Rebuild Project(Build > Rebuild Project)

    0 讨论(0)
  • 2020-12-07 12:16

    This issue is happens usually when you are running multiple android studio window with different projects.

    The solution is

    • choose project than delete .gradle and build folders
    • than clean and rebuild the project.

    please ref screen shot attached

    0 讨论(0)
  • 2020-12-07 12:16

    In my case build and launch project with different build configs was successful. But generating signed apk throws error Cause: buildOutput.apkData must not be null on the other hand apk was generated and Build Output toggle view prints BUILD SUCCESSFUL. Manual installation ends with message App not installed. My fault was using compileSdkVersion 'android-P' and after changing to compileSdkVersion 28 all goes well.

    0 讨论(0)
  • 2020-12-07 12:17

    1- Delete all generated app bundles (.aab) and APKs for all variants.

    2- Delete the build folder

    3- clean project

    0 讨论(0)
  • 2020-12-07 12:19

    Just change the Apk release/debug location.

    EX:

    /home/sanaebadi/Desktop
    

    after change :

    /home/sanaebadi/apk
    
    0 讨论(0)
提交回复
热议问题