android-studio - 资源编译失败
问题描述
我使用 Android Studio 3.2 并且我已经完成了一个 firebase 连接,以连接到我正在构建的应用程序的寄存器部分。
这是我看到错误的屏幕截图:https ://imgur.com/a/GN72eL8 & https://imgur.com/a/kwxA2sH
Android resource compilation failed
Output: C:\Users\ERIK\AndroidStudioProjects\FirebaseAuthDemo\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:12: error: not well-formed (invalid token).
Command: C:\Users\ERIK\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\92d92d266c9089a895db65475d7e7f04\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \
-o \
C:\Users\ERIK\AndroidStudioProjects\FirebaseAuthDemo\app\build\intermediates\res\merged\debug \
C:\Users\ERIK\AndroidStudioProjects\FirebaseAuthDemo\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #1
解决方案
您的/res/mipmap-anydpi-v26/ic_launcher.xml
文件在第 12 行不正确。这通常是由不正确的字符引起的,例如分号或句号。
如果您想要快速修复,可以删除此文件,否则打开文件查看编译器在第 12 行突出显示的问题。如果您无法找出问题所在,请使用文件内容和任何其他内容编辑您的问题错误。
推荐阅读
- java-8 - CompletableFuture -> 然后应用存储我以前的结果并且不会被删除
- java - 尝试使用 Selenium WebDriver 从 webelements 列表中获取文本
- php - 在 Symfony 4.4 中覆盖单个表单字段的标签以包含 HTML
- python - 在 keras 中使用数据生成器时如何输出 ypred 和 ytrue
- vba - Microsoft Word VBA 将 Web 链接插入到文档中的文本框
- erlang - 定义保护序列以及有效的保护表达式是什么?
- c++ - 如何在免费商店中分配 C++ 中的 3D 数组?
- typescript - 在打字稿中,我想为多个参数做一个类型保护
- huawei-mobile-services - 华为团队账号操作角色无法在华为应用库上传应用
- sed - 如何删除从第一个匹配到结束的行?