2

即使我们的应用程序没有使用混淆,当我们尝试运行时,我们还是会看到 mapping.txt 的 FileNotFoundException proguardDebugAndroidTest

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

错误:任务':StubHub:proguardDebugAndroidTest'的执行失败。java.io.FileNotFoundException:/build/outputs/mapping/debug/mapping.txt(没有这样的文件或目录)

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

4

2 回答 2

2

By creating the mapping.txt file in that path should be enough to solve the issue. It worked for me and is running just fine now

于 2015-05-01T19:10:50.153 回答
1

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

例如,如果它为 app/proguard/seeds.txt 显示“FileNotFoundException”,则在目录 app 中创建目录“proguard”。

于 2015-08-04T17:21:19.387 回答