我建立时总会出现在我身上

时间:2018-05-04 12:02:02

标签: android

Executing tasks: [:app:generateDebugSources]

Configuration on demand is an incubating feature.
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceDebug UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: G:\ProjectsClone\MessengerClone\app\google-services.json
AGPBI: {"kind":"error","text":"error: not well-formed (invalid token).","sources":[{"file":"G:\\ProjectsClone\\MessengerClone\\app\\src\\main\\res\\layout\\activity_weather.xml","position":{"startLine":53}}],"original":"","tool":"AAPT"}
:app:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception. 
  • 出了什么问题: 任务:app:mergeDebugResources的执行失败。

      

    错误:java.util.concurrent.ExecutionException:com.android.builder.internal.aapt.v2.Aapt2Exception:AAPT2错误:检查日志以获取详细信息

  • 尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获得全面的见解。

  • https://help.gradle.org

  • 获取更多帮助

在13s内建立失败 10个可操作的任务:2个执行,8个最新

2 个答案:

答案 0 :(得分:0)

最有可能的问题是,错误信息的确如此:

"找不到google-services.json"。

如果尚未完成,则需要从Firebase控制台下载此json文件并将其放在app文件夹中。

答案 1 :(得分:0)

错误在您的文件activity_weather.xml中。错误是not well formed,这意味着XML结构不正确,很可能在某处丢失了结束标记。