当 NestedScrollView 添加到 XML 时,Android Studio 预览消失

标签 android xml android-studio

我的 Android Studio 版本是 1.3(稳定 channel )。当我添加 <android.support.v4.NestedScrollView>对于我的 XML 布局,Android Studio 的预览从右侧消失,设计选项卡也消失了。

此外,当我想向 XML 添加新 View 时,我在建议对话框中看不到一些可添加的外部库 View 。例如我看不到 android.support.v4.NestedScrollview但是android.support.v7.widget.Toolbar可供选择。 support libraries shown when I start to type Nested...

我已将这些行添加到我的应用程序的依赖项中:

compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'

最佳答案

这是 Android Studio 中的一个错误,应该已经修复(至少在 1.5 中,它在 canary/beta channel 中可用)。该错误是在渲染预览过程中出现异常时,它在某些情况下被错误地隐藏。

如果您在 1.5 中仍然看到问题,请使用 http://tools.android.com/filing-bugs 中的说明提交错误

关于当 NestedScrollView 添加到 XML 时,Android Studio 预览消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31766229/

相关文章:

android - 底部 NavigationView 以编程方式更改项目

android - 在服务器上实时生成的图像流式传输到安卓手机

android - 我可以将用 Kotlin 编写的库导入到我的 android 项目中吗(使用 java)

java - 捕获来电号码

xml - 应该使用什么命令从 Linux 上的 XML 文件的一行中获取文本?

php - 使用 PHP 将 mySQL 表输出为 XML 以在谷歌地图上绘制位置

python - django tastypie 和 xml 错误消息 : Please check your `` formats `` and ` `content_types`` on your Serializer

java - 在 android studio 1.0 版本中生成 LibGdx 项目?

android - 如何更改 Android Studio 编辑器的背景颜色?

Android 应用程序 - 集成另一个 apk