Android Studio预览未正确显示RecyclerView和工具栏 [英] Android Studio Preview Not Showing RecyclerView and Toolbar Correctly
本文介绍了Android Studio预览未正确显示RecyclerView和工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请找到屏幕截图我为此做了很多搜索.我的android studio已更新为3.0.1.这是我项目中的依赖项.Studio 3.0.1是否有问题?
Please find the screenshots I searched lot for this. My android studio is updated with 3.0.1. Here are the dependencies in my project. Is the issue with studio 3.0.1?
compile 'com.android.support:appcompat-v7:23.4.+'
compile 'com.android.support:design:23.3.0'`
这是xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
推荐答案
如果在build.gradle文件中存在解析策略,则请按如下所示添加更新的依赖项
If resolution Strategy is present in your build.gradle file then please add updated dependency as below
configurations.all {
resolutionStrategy {
force 'com.android.support:design:27.0.1'
force 'com.android.support:support-v4:27.0.1'
force 'com.android.support:appcompat-v7:27.0.1'
}
}
这篇关于Android Studio预览未正确显示RecyclerView和工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文