Solved: org.gradle.internal.exceptions.LocationAwareException: buildOutput.apkData must not be null

If you have some code which was already complied using “./gradlew clean build” on the ubuntu command line and was using some old gradle version.

Now, if you open the same code from Android Studio, and if the android studio have moved to some most recent version of gradle, it will ask for you to update the gradle version and if you clicked OK, will go on updating gradle version.

At the end of all this process, when the compilation of already compiled code with old gradle version starts from Studio with new gradle version, you might get a failure like as below,

org.gradle.internal.exceptions.LocationAwareException: 
buildOutput.apkData must not be null

Solution:

As mention above, the error has been caused since there was already compiled build directory present which was compiled with old gradle version.


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


Related :   Identify media encoder / decoder (codec) information of Android device

For Solving the error using Android Studio :

  • Build -> Clean Project
  • Build -> Make Project

For Solving the error using command line

$ ./gradlew clean build 

OR, you can manually delete “build” directory and recompile everything.

lynxbee_ezoic

1 thought on “Solved: org.gradle.internal.exceptions.LocationAwareException: buildOutput.apkData must not be null”

Leave a Comment

Android Android Build system Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded