从文本文件解析渐变异常消息

2022-07-06 12:47:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我在文本文件中有一个Gradle构建异常消息,如下所示

 "Error code is 1\nCommand line is: output/googlesamples/android-> ActionBarCompat-Basic/head/gradlew --stacktrace -p output/googlesamples/android-ActionBarCompat-Basic/head assembleDebug\n\n\nFAILURE: Build failed with an exception.\n\n\n\n* Where:\n\nBuild file '/...../output/googlesamples/android-ActionBarCompat-Basic/head/Application/build.gradle' line: 12\n\n\n\n* What went wrong:\n\nA problem occurred evaluating project ':Application'.\n\n> Failed to apply plugin [id 'com.android.application']\n\n   > Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper

python中有没有库可以用来解析这个异常消息并获取其中的各个部分?你知道吗

eg: Error Code, Command line, FAILURE, etc ?.


Tags: 消息outputbasicapplicationisversionlineerrorheadandroid文本文件gradlegooglesamplesactionbarcompat