代替预览,Android Studio仅显示黑屏,上面写有"android ... ActionBarOverlayLayout" [英] instead of preview, Android Studio showing only black screen with 'android...ActionBarOverlayLayout' written on it
问题描述
几天后,我无法查看屏幕/布局的预览/设计. 仅显示黑屏,上面写有 android ... ActionBarOverlayLayout .
From few days, I'm not able to see preview/design of screens/layouts. Only a black screen is shown with android...ActionBarOverlayLayout written on it.
logcat中没有错误或异常.同样,在运行项目后,设备上没有问题. Android Studio中只有预览"和设计"标签显示黑屏.
There is no error or exception in logcat. Also after running the project no issue on device. Only preview and Design tab in Android Studio showing black screen.
在某些Android Studio和构建工具更新(自动发生)之后,所有布局都会发生这种情况
This is happening for every layouts after some Android Studio and build tools updates(which happened automatically)
注意:如果我在预览中更改了主题(在编辑器中为主题),则有时会显示预览,但这是非常奇怪的预览,不能用于开发
Note: If I change Theme in preview (Theme in Editor), then sometimes the preview is shown, but it's very weird preview which can't be used for development
推荐答案
得到此错误消息:
Error:Execution failed for task ':app:processDebugManifest'.
Suggestion: use a compatible library with a minSdk of at most 9,
or increase this project's minSdk version to at least 14.
解决方案是(如每个人之前所说的)匹配版本:
compileSdkVersion 26
buildToolsVersion '26.0.2'
targetSdkVersion 26
compile "com.android.support:support-v4:26.0.2"
compile "com.android.support:design:26.0.2"
还要更改兼容的库minSDK
But also change the compatible library minSDK
minSdkVersion 14
播放服务
compile 'com.google.android.gms:play-services:11.8.0'
这篇关于代替预览,Android Studio仅显示黑屏,上面写有"android ... ActionBarOverlayLayout"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!