【发布时间】:2014-07-04 03:26:36
【问题描述】:
我很绝望。我有一个简单的 hello world 应用,有一个向导空活动和两个布局:
res/layout/activity_main.xml res/layout-small/activity_main.xml
activity_main.xml 两个文件的内容相同:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#FF0000"
android:padding="10dp"
android:text="@string/hello_world" />
</RelativeLayout>
如果我首先打开 layout/activity_main.xml 没问题,图形布局加载布局没问题,但是如果我在设备列表图形布局管理器中选择例如设备 Generic->3.7" WVGA(它不小)打开 layout-small/ activity_main.xml,如果我尝试将设备更改为任何设备,我会收到此控制台日志:
[2014-07-03 20:50:39 - prueba_layout] 'default' is not a best match for any device/locale combination.
[2014-07-03 20:50:39 - prueba_layout] Displaying it with ', , Locale Language ___Region __, Left To Right, sw320dp, w320dp, h480dp, Normal Screen, Short screen aspect ratio, Portrait Orientation, Normal, Day time, Medium Density, Finger-based touchscreen, Hidden keyboard, Qwerty keyboard, Hidden navigation, No navigation, Screen resolution 480x320, API Level 19'
我已经尝试过 Project->Clean & restart eclipse 但不起作用。另外我已经完全重新安装了 Eclipse 和 ADT 插件,问题仍然存在。最后我尝试删除所有构建路径内容以强制 Eclipse 重建,但也不起作用。
感谢您的帮助。谢谢。
【问题讨论】:
标签: android eclipse android-layout