Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the <module>/release/output.json generated by Android Studio

I recently noticed a new file generated at <module>/release/output.json by Android Studio 3 Canary 1 each time I run Build -> Generate Signed APK..., which has contents that look like following.

Can anyone confirm seeing this behavior as well? Or is it due to some local configuration on my laptop?

And can anyone explain the purpose of this file? Is it safe to add to .gitignore?

[{   "outputType": {     "type": "APK"   },   "apkInfo": {     "type": "MAIN",     "splits": [],     "versionCode": 32   },   "outputFile": {     "path": "/path/to/the/generated/release/filename.apk"   },   "properties": {     "packageId": "com.example.android",     "split": ""   } }] 
like image 463
Sah Avatar asked May 26 '17 12:05

Sah


People also ask

What is output json file in android studio?

From the latest release of Android Studio 3.0 (canary and stable), they have organized this file structure. For every flavour dimension, whenever you sign an APK, it will have a separate folder with a corresponding output. json file in it. This file is actually nothing but a description of the source APK.

What is output json?

The output. json file is the main output file of CHAP and contains all data except for what is needed in 3D molecular visualisation. It abides by the specification of the JSON file format and can easily be read into any common programming language for visualisation or further processing.


1 Answers

Android studio 3.0 is responsible for this file. You don't need to worry about the output.json file.

Let me explain this to you:

For older versions, what Android Studio did was generate a signed APK and put it in the "output" folder. Even If you had multiple flavour dimensions for your APK, all of them could be located at the same directory, which was the output folder. From the latest release of Android Studio 3.0 (canary and stable), they have organized this file structure. For every flavour dimension, whenever you sign an APK, it will have a separate folder with a corresponding output.json file in it. This file is actually nothing but a description of the source APK. As you can see, the file you shared here is describing the released APK.

like image 100
Wubbalubbadubdub Avatar answered Oct 14 '22 13:10

Wubbalubbadubdub