proguardDebugAndroidTest 执行失败 mapping.txt 的 FileNotFoundException,proguard 配置中带有 -dontobfuscate 标志

proguardDebugAndroidTest Execution Failing with FileNotFoundException for mapping.txt with -dontobfuscate flag in proguard configuration

即使我们的应用程序不使用混淆,当我们尝试 运行 proguardDebugAndroidTest 时,我们也会看到 mapping.txt 的 FileNotFoundException。

我们在生成正常的调试或发布版本时没有看到此错误。我们只在尝试为仪器测试制作 apk 时看到此错误:

Error:Execution failed for task ':StubHub:proguardDebugAndroidTest'. java.io.FileNotFoundException: /build/outputs/mapping/debug/mapping.txt (No such file or directory)

我们正在使用 Android Studio 1.2 和 gradle 插件 1.1.3。有没有其他人 运行 遇到过这个问题并且能够成功解决它?如果是,怎么做?

通过在该路径中创建 mapping.txt 文件应该足以解决问题。它对我有用,现在 运行 就好了

挖掘一个老问题,因为我为此苦苦挣扎了一段时间。即对我来说 "seeds.txt" 显然不见了。 Jorge 是对的,但如果有人对任何其他 proguard 文件出现此异常,请确保 proguard 目录存在。我不知道为什么 Android Studio 不会自行生成它。

例如,如果它说 "FileNotFoundException" for app/proguard/seeds.txt,则在目录 app 中创建目录 "proguard"。