You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry I don't speak Chinese but if you are having a problem getting Android working, @supermanxiacheng has the answer that I used to get it working.
In my app, the file is android/app/src/main/res/values/colors.xml
File contents:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- this is referenced by react-native-splash-screen and will throw an error if not defined. its value does nothing, just here to avoid a runtime error. -->
<color name="primary_dark">#000000</color>
</resources>
Activity
ZhaZhengRefn commentedon Dec 29, 2017
同样遇到这个问题。不知道怎么解决
readthecodes commentedon Dec 29, 2017
遇到了同样的问题
supermanxiacheng commentedon Jan 3, 2018
#127
应该和这个issue的解决方法相同.
嗨,尝试这个方法:
创建文件 android/app/src/main/res/values/colors.xml
填入一下内容
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="primary_dark">#660B0B0B</color> </resources>
showtan commentedon Jan 8, 2018
@supermanxiacheng 不是这个 而且打包屏显后闪退 @readthecodes @ZhaZhengRefn @spenggithub @StevePotter 你们解决没
StevePotter commentedon Jan 8, 2018
Sorry I don't speak Chinese but if you are having a problem getting Android working, @supermanxiacheng has the answer that I used to get it working.
In my app, the file is
android/app/src/main/res/values/colors.xml
File contents:
1c7 commentedon Jan 9, 2018
@StevePotter Your solution work! Thanks!
I am using React Native 0.51 and
react-native run-android
1c7 commentedon Jan 9, 2018
楼上说加个 colors.xml 文件 + 填入内容可以解决闪退问题。
试了管用。
React Native 0.51 + 在安卓模拟器上运行。
我看了好几次文档以为自己哪里做错了。原来是这样的小问题。
1c7 commentedon Jan 9, 2018
@crazycodeboy 建议把这个问题加入文档
(安卓闪退问题,加个 colors.xml 解决)
crazycodeboy commentedon Jan 11, 2018
在使用
react-native-splash-screen
APP的color.xml中添加:react-native-splash-screen
需要一个名为primary_dark
的颜色值作为状态栏的颜色;DruidTedaHill commentedon Apr 13, 2018
@StevePotter Hi,guys,successfully solved my problem,thanks.
jsu93 commentedon Apr 19, 2018
到底是 colors.xml 还是 color.xml??