2

actionbarsherlock を使用してきましたが、問題なく動作していますが、2.2 エミュレーターを試してみて、この出力を DDMS に取得しました。アプリは一度レンダリングする機会を得られず、いくつかの onCreate() メソッドが呼び出された直後にシャットダウンします。他の誰かがこれを見ましたか?:

Style contains key with bad entry: 0x010102ce
Style contains key with bad entry: 0x010102f3
Style contains key with bad entry: 0x010102ce
Style contains key with bad entry: 0x010102f3
VFY: unable to resolve virtual method 4361: Lcom/actionbarsherlock/internal/nineoldandroids/widget/NineFrameLayout;.onHoverEvent (Landroid/view/MotionEvent;)Z
VFY: unable to resolve virtual method 3077: Landroid/widget/FrameLayout;.getAlpha ()F
VFY: unable to resolve virtual method 3078: Landroid/widget/FrameLayout;.getTranslationY ()F
VFY: unable to resolve virtual method 3081: Landroid/widget/FrameLayout;.setAlpha (F)V
VFY: unable to resolve virtual method 3089: Landroid/widget/FrameLayout;.setTranslationY (F)V
VFY: unable to resolve virtual method 317: Landroid/content/pm/PackageManager;.getActivityLogo (Landroid/content/ComponentName;)Landroid/graphics/drawable/Drawable;
VFY: unable to resolve virtual method 313: Landroid/content/pm/ApplicationInfo;.loadLogo (Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;
VFY: unable to resolve virtual method 2832: Landroid/view/ViewGroup;.getAlpha ()F
VFY: unable to resolve virtual method 2838: Landroid/view/ViewGroup;.getTranslationX ()F
VFY: unable to resolve virtual method 2839: Landroid/view/ViewGroup;.getTranslationY ()F
VFY: unable to resolve virtual method 2854: Landroid/view/ViewGroup;.setAlpha (F)V
VFY: unable to resolve virtual method 2858: Landroid/view/ViewGroup;.setTranslationX (F)V
VFY: unable to resolve virtual method 2859: Landroid/view/ViewGroup;.setTranslationY (F)V
VFY: unable to resolve virtual method 5290: Lcom/actionbarsherlock/internal/widget/ActionBarView$HomeView;.onHoverEvent (Landroid/view/MotionEvent;)Z
VFY: unable to resolve virtual method 3080: Landroid/widget/FrameLayout;.onPopulateAccessibilityEvent (Landroid/view/accessibility/AccessibilityEvent;)V
ReferenceTable overflow (max=512)
Last 10 entries in JNI local reference table:
  502: 0x43ecaca0 cls=Ljava/lang/String; (28 bytes)
  503: 0x43ecacf0 cls=Ljava/lang/String; (28 bytes)
  504: 0x43ecad40 cls=Ljava/lang/String; (28 bytes)
  505: 0x43ecad90 cls=Ljava/lang/String; (28 bytes)
  506: 0x43ecade0 cls=Ljava/lang/String; (28 bytes)
  507: 0x43ecae30 cls=Ljava/lang/String; (28 bytes)
  508: 0x43ecae80 cls=Ljava/lang/String; (28 bytes)
  509: 0x43ecaed0 cls=Ljava/lang/String; (28 bytes)
  510: 0x43ecaf20 cls=Ljava/lang/String; (28 bytes)
  511: 0x43ecaf70 cls=Ljava/lang/String; (28 bytes)
JNI local reference table summary (512 entries):
    3 of Ljava/lang/Class; 164B (2 unique)
  507 of Ljava/lang/String; 28B (507 unique)
    1 of [Ljava/lang/String; 28B
    1 of [Ljava/lang/String; 2772B
Memory held directly by tracked refs is 17324 bytes
Failed adding to JNI local ref table (has 512 entries)
VM aborting

ありがとう

4

1 に答える 1

4

これは、レイアウト simple_list_item_activated_1 が API 11 より前に存在しないためです (投稿を参照)。

アプリを実行するには、 simple_list_item_activated_1に基づいて新しいリスト レイアウトを作成し、代わりにそれをコードで使用します。

これがスターターです:

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/text1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:minHeight="?android:attr/listPreferredItemHeight"
/>

これによりコードが実行されますが、削除したため、正しく表示されません。

android:background="?android:attr/activatedBackgroundIndicator"

API 11 定義から。次に、それを同等のコードに置き換えました-投稿を参照してください

ここに問題を説明するチュートリアルがあります。

于 2012-08-30T00:37:56.753 に答える