android - Android Studio 不支持layout-xxhdpi/layout-xxlarge

标签 android layout android-studio

Android Studio 不支持。我想创建新手机的布局,例如 Galaxy S4。我有一个要测试,尺寸太小。但是 android studio 编译器给出了一个错误,因为出现了正斜杠。我尝试了layout-xxlarge,它也给出了错误。

android-apt-compiler: [xxxxxxxxxx] invalid resource directory name: 

C:\Users\xxxxxxxxxxxxxx\Dropbox\android_studio_workspace\xxxxxxxxxxxxxxxxx\res/layout-xxlarge

Eclipse 支持这些布局吗?

最佳答案

如您所见here ,“声明 Android 3.2 的平板电脑布局”部分:

For the first generation of tablets running Android 3.0, the proper way to declare tablet layouts was to put them in a directory with the xlarge configuration qualifier (for example, res/layout-xlarge/). In order to accommodate other types of tablets and screen sizes—in particular, 7" tablets—Android 3.2 introduces a new way to specify resources for more discrete screen sizes. The new technique is based on the amount of space your layout needs (such as 600dp of width), rather than trying to make your layout fit the generalized size groups (such as large or xlarge).

你能得到的最好的是:

res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

定义了您需要的 here .

关于android - Android Studio 不支持layout-xxhdpi/layout-xxlarge,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17423625/

相关文章:

android - 设置包名称是否会使隐式 Intent 显式化?

android - 椭圆大小属性不适用于 Android 4.0

android-studio - 在 Android Studio 中,有没有办法在 jar、aar 和 maven 导入的库中搜索单词?

java - 如何将解析后的 XML 显示到 ListView

android - Kotlin:具有泛型参数类的函数

Android 多行 Snackbar

android - android-sdk\tools 中缺少 Emulator.exe

html - float 在绝对定位的 div 内,放置在相对定位的元素内

html - 侧边栏高度为 100% 的布局

android - minSdkVersion 低于设备 API 版本的 INSTALL_FAILED_OLDER_SDK