什么是Android Studio生成的< module>/release/output.json [英] What is the <module>/release/output.json generated by Android Studio

查看:220
本文介绍了什么是Android Studio生成的< module>/release/output.json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近注意到,每次运行Build-> Generate Signed APK...时,Android Studio 3 Canary 1都会在<module>/release/output.json处生成一个新文件,其内容如下所示.

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?

任何人都可以解释此文件的用途吗?添加到.gitignore是否安全?

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": ""
  }
}]

推荐答案

Android Studio 3.0对此文件负责.您无需担心output.json文件.

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

让我向您解释一下:

对于较旧的版本,Android Studio所做的是生成一个签名的APK,并将其放在输出"文件夹中.即使您的APK具有多个风味尺寸,它们也都可以位于同一目录下,即输出文件夹.从最新版本的Android Studio 3.0(金丝雀和稳定版)开始,他们组织了这种文件结构.对于每个风味维度,每当您对APK签名时,它都会有一个单独的文件夹,其中包含相应的output.json文件.该文件实际上只是源APK的描述.如您所见,您在此处共享的文件描述了已发布的APK.

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.

这篇关于什么是Android Studio生成的&lt; module&gt;/release/output.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆