1

コマンドライン ( http://stand.spree.de/wiki_details_maven_archetypes ) を使用して、Android-Maven アーキタイプ プロジェクトを作成しました。

このプロジェクトを ADT にインポートしたとき (グラフィカル エディターを活用できるようにするため)、グラフィカル エディターでビューが正しく表示されないことがわかりました。
res/layout の下に自動生成された activity_main.xml の場合、期待されるレイアウトが表示されません。代わりに、それは不平を言います:

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.

以下のようなスクリーンショット:

ここに画像の説明を入力

プロジェクトディレクトリは次のとおりです。 ここに画像の説明を入力

この 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 ファイル:

# Project target.
target=android-16

また、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>

グラフィカル エディターに表示するにはどうすればよいかわかりません。

助けてください。追加情報が必要な場合はお知らせください。

4

1 に答える 1

1

プロジェクトをクリーンアップしてEclipseを再起動してください。それはいつも私に起こります

于 2013-10-29T13:44:46.207 に答える