简体   繁体   English

Android Maven原型项目布局在ADT图形编辑器上显示不正确

[英]Android Maven archtype project layout doesn't show correct on ADT Graphical Editor

I created an Android-Maven archetype project using command line ( http://stand.spree.de/wiki_details_maven_archetypes ). 我使用命令行( http://stand.spree.de/wiki_details_maven_archetypes )创建了一个Android-Maven原型项目。

When I imported this project to ADT (so that I can take some advantage of the graphical editor), I found the graphical editor doesn't show the view correctly. 当我将该项目导入ADT(以便可以利用图形编辑器)时,我发现图形编辑器无法正确显示视图。
For the auto generated activity_main.xml under res/layout, it doesn't displaying the expected layout. 对于res / layout下自动生成的activity_main.xml,它不会显示预期的布局。 Instead, it complains: 相反,它抱怨:

No resources match the configuration

, , Locale Language ___Region __, Left To Right, sw320dp, w320dp, h533dp, Normal Screen, Long screen aspect ratio, Portrait Orientation, Normal, Day time, High Density, Finger-based touchscreen, Soft keyboard, No keyboard, Exposed navigation, Trackball navigation, Screen resolution 800x480, API Level 18

Change the configuration or create:

res/layout-ldltr-sw320dp-w320dp-h533dp-normal-long-port-notnight-hdpi-finger-keyssoft-nokeys-navexposed-trackball-800x480-v18/activity_main.xml

You can also click the 'Create New...' item in the configuration dropdown menu above.

Screen shot as below: 屏幕截图如下:

在此处输入图片说明

Here is the project directory: 这是项目目录: 在此处输入图片说明

This Activity_Main.xml is pretty straight forward as below: 这个Activity_Main.xml非常简单,如下所示:

<?xml version="1.0" encoding="utf-8"?>

<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />

Project.properties file: Project.properties文件:

# Project target.
target=android-16

And AndroidManifest is also simple: AndroidManifest也很简单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.hizz.android"
android:versionCode="1"
android:versionName="1.0-SNAPSHOT" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="16" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <activity android:name=".HelloAndroidActivity" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

I am not sure what I should do to make it show on the graphical editor. 我不确定该怎么做才能在图形编辑器上显示它。

Please help out, and let me know if you need any extra information. 请帮忙,如果您需要任何其他信息,请告诉我。

清理您的项目并重新启动Eclipse,这总是发生在我身上

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM