2

I've been using actionbarsherlock, it's been running fine but I just tried on a 2.2 emulator and get this output to DDMS. The app doesn't get a chance to render itself once, just shuts down immediately after some onCreate() methods are called. Has anyone else seen this?:

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

Thanks

user291701
  • 38,411
  • 72
  • 187
  • 285

1 Answers1

4

This is because the layout simple_list_item_activated_1 does not exist before API 11 (see post).

To get the app to run, you can create a new list layout based on simple_list_item_activated_1 and use that in your code instead.

Here's a starter:

<?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"
/>

This gets the code to run, however it won't look quite right, as I removed

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

from the API 11 definition. I then went on to replace it with some equivalent code - see post

There is a tutorial explaining the problem here.

Community
  • 1
  • 1
Andy Joiner
  • 5,932
  • 3
  • 45
  • 72