- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我更新了我的 Android Studio from 3.0.1 to 3.1,并注意到我现有项目中有一个不熟悉的文件:
.idea/caches/build_file_checksums.ser
这不取决于你是否将 Android Gradle 插件更新为 the latest 3.1.0 ;一旦我在 Android Studio 3.1 中打开一个现有项目,它会自动创建文件 build_file_checksums.ser
,即使我保持项目使用之前的 3.0.1 插件如下。
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
我也在Android Studio 3.1新建了一个项目,发现build_file_checksums.ser
文件是从头创建的。
在撰写本文时,似乎没有关于此的官方文件。如果有人能找到,我将不胜感激。
我用 inspected jdeserialize-1.2 内容,因为 Samuel 指出它似乎包含一些系统路径。
$ java -jar ~/Downloads/jdeserialize-1.2.jar .idea/caches/build_file_checksums.ser
read: com.android.tools.idea.gradle.project.ProjectBuildFileChecksums _h0x7e0002 = r_0x7e0000;
//// BEGIN stream content output
com.android.tools.idea.gradle.project.ProjectBuildFileChecksums _h0x7e0002 = r_0x7e0000;
//// END stream content output
//// BEGIN class declarations (excluding array classes)
class java.util.HashMap implements java.io.Serializable {
float loadFactor;
int threshold;
}
class com.android.tools.idea.gradle.project.ProjectBuildFileChecksums implements java.io.Serializable {
long myLastGradleSyncTimestamp;
java.util.Map myFileChecksums;
}
//// END class declarations
//// BEGIN instance dump
[instance 0x7e0004: 0x7e0003/java.util.HashMap
object annotations:
java.util.HashMap
[blockdata 0x00: 8 bytes]
[String 0x7e0005: "settings.gradle"]
[array 0x7e0007 classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -89, -2, 26, -61, -111, 105, -75, -27, 40, 90, 94, 83, 102, 47, 37, 27]
[String 0x7e0008: "build.gradle"]
[array 0x7e0009 classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 70, 101, -14, 32, 100, -60, -85, -103, 73, -86, 15, 54, -45, 125, 50, 39]
[String 0x7e000a: "local.properties"]
[array 0x7e000b classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -107, 64, 60, -33, -18, 18, 56, -84, 15, 0, -86, -73, -27, 127, -94, 27]
[String 0x7e000c: "/Users/qtmfld/.gradle/gradle.properties"]
[array 0x7e000d classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -44, 29, -116, -39, -113, 0, -78, 4, -23, -128, 9, -104, -20, -8, 66, 126]
[String 0x7e000e: "gradle.properties"]
[array 0x7e000f classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 16, -69, 118, 80, -49, -19, 41, -8, 56, -86, 64, -63, 112, -14, 98, 47]
[String 0x7e0010: "app/build.gradle"]
[array 0x7e0011 classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -3, -11, 63, -26, 67, -41, -100, 33, 85, -59, -49, -3, -90, 53, -106, 94]
field data:
0x7e0003/java.util.HashMap:
threshold: 12
loadFactor: 0.75
]
[instance 0x7e0002: 0x7e0000/com.android.tools.idea.gradle.project.ProjectBuildFileChecksums
field data:
0x7e0000/com.android.tools.idea.gradle.project.ProjectBuildFileChecksums:
myFileChecksums: r0x7e0004: java.util.HashMap _h0x7e0004 = r_0x7e0003;
myLastGradleSyncTimestamp: 1522297024540
]
//// END instance dump
$
您可以在java.util.HashMap
中看到以下字符串。
Wh0 已在 Android Studio 3.2 Preview 上澄清了相同的结果。
https://wh0.github.io/2018/02/17/build-file-checksums-ser.html
最佳答案
您应该将它添加到 .gitignore
。不要将它包含在您的 git add
中。
在左侧的项目窗口中,
(a) 将 Android View 更改为 the Android project view , 带有下拉菜单。
(b) 您可以在文件夹 .idea/caches
中看到 build_file_checksums.ser
。
(c) 打开项目根目录的.gitignore
。 (不要与 app 模块的 .gitignore
混淆。)
在右侧的.gitignore
内容中,
(d) 添加/.idea/caches/build_file_checksums.ser
。
JetBrain's guide告诉你应该分享
- All the files under .idea directory in the project root except the workspace.xml and tasks.xml files which store user specific settings
它还说
You may consider not to share the following:
- .iml files for the Gradle or Maven based projects, since these files will be generated on import
- gradle.xml file, see this discussion
- user dictionaries folder (to avoid conflicts if other developer has the same name)
- XML files under .idea/libraries in case they are generated from Gradle or Maven project
因此,Android Studio 中新建项目的默认 .gitignore
为:
*.iml
.gradle
/local.properties
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
但是,build_file_checksums.ser
文件是一个 Java 序列化对象,其中包含以下内容的哈希和时间戳:
所以,看起来像 the issue是优先级 P2 和严重性 S2,并且已经被接受和修复。我期待 future 的版本,其中默认的 .gitignore
包括
/.idea/caches/build_file_checksums.ser
关于android - 我应该将 .idea/caches/build_file_checksums.ser 添加到 .gitignore 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49557737/
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 8 年前。 Improve t
我卡在了一个点上,我无法进步,很抱歉这个愚蠢的问题。我为此进行了很多搜索,但我不知道我错过了什么。请帮助我。 我研究了 python 中的模块和类。现在我想使用 python 和 apt 进行一些操作
我在 Kong 有服务,我已经为该服务设置了代理缓存插件。 curl -X POST http://localhost:8001/plugins --data "name=proxy-cache"--
ASP.NET Core 提供内存缓存和响应缓存。 假设该应用程序是 ASP.NET Core WebAPI,它通过配置的响应缓存中间件将 SQL 数据库中的数据传送给用户。 在什么情况下也使用内存缓
我最近遇到了以下面试问题: You need to design a system to provide answers to factorials for between 1 and 100. Yo
我的 Javascript (JS) 代码遇到了一些麻烦,因为我有时需要在同一个函数中多次访问相同的 DOM 元素。还提供了一些推理here . 从性能的角度来看,是一次性创建一个 jQuery 对象
仅使用 Cache 终端,我使用或查看什么实用程序函数或 Global 来查找存在于 Cache 数据库中的所有 Globals 的列表? 再次仅在缓存终端中使用,我使用或查看什么实用程序功能或全局以
我的 Javascript (JS) 代码遇到了一些麻烦,因为有时我需要在同一个函数中多次访问同一个 DOM 元素。还提供了一些推理here . 从性能的角度来看,是先创建一个jQuery对象然后缓存
来自 RFC 2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1 no-cache If the no-cach
大多数 CDN 服务器对经常访问的内容使用缓存。 场景:假设有人上传了一张非常热门的图片,并且来自同一位置的许多用户 (1000) 试图访问该图片。 问题:假设网络服务器收到一个请求,首先检查它的缓存
我的 Javascript (JS) 代码遇到了一些麻烦,因为有时我需要在同一个函数中多次访问同一个 DOM 元素。还提供了一些推理here . 从性能的角度来看,是先创建一个jQuery对象然后缓存
如果我将服务器响应设置为:Cache-Control: private,no-cache,max-age=900 ? 如果标题是这样的,会发生什么:Cache-Control: public,no-c
我有一个类需要在缓存中存储数据。最初我在 ASP.NET 应用程序中使用它,所以我使用了 System.Web.Caching.Cache。 现在我需要在 Windows 服务中使用它。现在,据我了解
我遇到了和这个人一样的问题:X-Drupal-Cache for Drupal 7 website always hits MISS ,并且找不到出路。 我正在运行 Drupal 7 - 新闻流 和
我已将 Laravel 设置为使用 Redis 作为缓存。当我使用 Cache::('my_var', 'my_val'); 然后通过 CLI 检查 Redis 以查看 key 是否已创建时,我可以验
我在 Windows Azure 云上有一个应用程序,并且正在使用 Windows Azure 共置缓存。 有时,当我发布网站/web服务时,调用DataCacheFactory.GetCache方法
我正在阅读 documentation for Apollo server-side caching ,但看不到任何关于缓存通常如何加密的内容。 我需要的是一个以响应中包含的对象 ID 为键的缓存,而
Hibernate\Grails 中最好的缓存策略是什么?是否缓存所有实体和查询以及如何找到最佳解决方案? 这是我的 hibernate 配置。 hibernate { cache.use_sec
我收到错误 'Nuget.Proxy Cache' 的类型初始化器抛出异常 尝试连接到 Nuget 官方包源时。我在公司网络后面,但是我怀疑问题是连接性。 有任何想法吗? 最佳答案 我有同样的问题。我
我是一名优秀的程序员,十分优秀!