如何禁用 espresso 测试的 proguard。
我为调试构建类型启用了混淆器。但我想禁用 proguard 进行 espresso 调试测试。
debug {
minifyEnabled true
shrinkResources true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
testProguardFile 'test-proguard-project.pro'
}
Run Code Online (Sandbox Code Playgroud)
我的 test-proguard-project.pro 看起来像
-dontoptimize
-dontwarn
-dontobfuscate
Run Code Online (Sandbox Code Playgroud)
proguard 仍在优化测试应用程序。请帮助我如何禁用测试应用程序的混淆器。
我想获得完整的系统日志。目前,我正在使用下面的代码来获取系统日志
try {
final Process process = Runtime.getRuntime().exec("logcat -d -v threadtime *:I");
final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(
process.getInputStream()));
String line;
while ((line = bufferedReader.readLine()) != null) {
lineList.add(line);
}
} catch (final IOException e) {
Log.e(e.toString());
}
Run Code Online (Sandbox Code Playgroud)
我能够使用上面的代码成功获取系统日志。它只提供最后 30 分钟的日志。但是,我希望从我的应用程序启动中获得完整的系统日志。是否可以将系统日志写入我们的私有文件?