阵营原住民 - “@绘制/ background_splash”错误
问题描述:
您好我用这篇文章,以改变我的启动画面使用Android原生的反应,但我得到这个错误:Article Link阵营原住民 - “@绘制/ background_splash”错误
:app:mergeDebugResources
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest
:app:processDebugResources
D:\Projects 2016\Web\Android\3 Splash Project\Mohajerkade\android\app\build\inte
rmediates\res\merged\debug\values\values.xml:1365:47-74: AAPT: No resource found
that matches the given name (at 'android:windowBackground' with value '@drawabl
e/background_splash').
Failed to generate resource table for split ''
D:\Projects 2016\Web\Android\3 Splash Project\Mohajerkade\android\app\build\inte
rmediates\res\merged\debug\values\values.xml:1365: error: Error: No resource fou
nd that matches the given name (at 'android:windowBackground' with value '@drawa
ble/background_splash').
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
@drawable/background_splash
是Style.xml什么我应该怎么做?
答
我的文章是针对Android基础,本文重点讨论RN(https://medium.com/handlebar-labs/how-to-add-a-splash-screen-to-a-react-native-app-ios-and-android-30a3cec835ae)
Awnsered斯宾塞卡利
答
这个问题可以通过文件权限引起的。我的操作系统是Win10。我以管理员身份运行终端。 react-native run-android
您是否创建了background_splash.xml文件?那个错误让我觉得你没有。实际上,我已经有一篇关于向React Native添加启动画面的分步文章(您链接的文章是Android的基础 - 我只是将它重点放在了RN上)。 https://medium.com/handlebar-labs/how-to-add-a-splash-screen-to-a-react-native-app-ios-and-android-30a3cec835ae –
解决。感谢您的惊人教程。 @ spencer-carli –
@ spencer-carli,我有白色页面显示在应用程序之前的闪屏后,我该怎么办? –