无法构建项目,Gradle输出告诉Use JsonReader.setLenient(true)在第1行第1行路径$

时间:2018-03-15 16:28:14

标签: android build

我刚刚打开了我的项目而无法构建它。 这是我的Gradle控制台输出:

18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:mergeDebugResources'.
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Error: java.lang.RuntimeException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 
18:12:07.274 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 4s

当我为yesterda工作时,一切都运作良好。我该怎么办? 提前谢谢!

1 个答案:

答案 0 :(得分:0)

哪个JSON文件出错?该文件可能已损坏。

如果是FirebaseCrashlytics或其他库提供的JSON文件,您可以在清理项目后重新下载并替换该文件。