首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >XML错误:错误:启动屏幕(React Native)中的格式不正确(令牌无效)

XML错误:错误:启动屏幕(React Native)中的格式不正确(令牌无效)
EN

Stack Overflow用户
提问于 2019-06-02 23:18:36
回答 1查看 114关注 0票数 1

我试图在React应用程序中实现闪屏,但在调试时,闪屏文件出现错误: error: not -formed (invalid token)

代码语言:javascript
运行
复制
<?xml version='1.0' encoding='utf-8' ?>

<layer-list xmlns:='http://schemas.android.com/apk/res/android'>
  <item android:drawable='@color/primary' />
  <item
  android:width='200dp'
  android:height='200dp'
  android:drawable='@drawable/icon'
  android:gravity='center'
  /> 
</layer-list>

错误消息:

代码语言:javascript
运行
复制
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Task :app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
  C:\Users\leand\AppTCC\android\app\src\main\res\drawable\background_splash.xml:3: error: not well-formed (invalid token).
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56416343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档