"Couldn't find content container view" on pre-4.0 devices

942 views
Skip to first unread message

Luke Monahan

unread,
Apr 24, 2012, 8:20:47 PM4/24/12
to ActionBarSherlock
I've just upgraded to ABS 4.02 (from the 3.x version) and everything
is working fine on my 4.03 device.

It's not working at all on my 2.2 and 3.x emulators, with the
following exception:

04-25 00:07:50.704: E/AndroidRuntime(408): Caused by:
java.lang.RuntimeException: Couldn't find content container view
04-25 00:07:50.704: E/AndroidRuntime(408): at
com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:
1047)
04-25 00:07:50.704: E/AndroidRuntime(408): at
com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:
912)
04-25 00:07:50.704: E/AndroidRuntime(408): at
com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:
846)
04-25 00:07:50.704: E/AndroidRuntime(408): at
com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:
309)

I can't figure out why it could be happening.

This occurs simply on inflating my main layout, with setContentView in
a SherlockFragmentActivity. The layout is shown below.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:id="@+id/root"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.viewpagerindicator.TabPageIndicator
android:id="@+id/titles"
android:layout_height="wrap_content"
android:layout_width="fill_parent" />
<android.support.v4.view.ViewPager
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/pager"/>
</LinearLayout>

As you can see I'm using ViewPagerIndicator 2.2.3 also.

Thanks,

Luke.

Andrea D'Alessandro

unread,
Jun 5, 2012, 1:25:14 PM6/5/12
to actionba...@googlegroups.com
Any update on this ?? I have the same issue...

06-05 17:18:27.069: D/ActionBarSherlock(5581): [setContentView] layoutResId: 2130903087
06-05 17:18:27.069: D/ActionBarSherlock(5581): [installDecor]
06-05 17:18:27.090: D/ActionBarSherlock(5581): [generateLayout]
06-05 17:18:27.090: D/ActionBarSherlock(5581): [requestFeature] featureId: 8
06-05 17:18:27.099: D/ActionBarSherlock(5581): [hasFeature] featureId: 1
06-05 17:18:27.099: D/ActionBarSherlock(5581): [hasFeature] returning false
06-05 17:18:27.099: D/ActionBarSherlock(5581): [hasFeature] featureId: 9
06-05 17:18:27.099: D/ActionBarSherlock(5581): [hasFeature] returning false
06-05 17:18:27.109: D/ActionBarSherlock(5581): [generateLayout] using screen XML res/layout/abs__popup_menu_item_layout.xml
06-05 17:18:27.159: D/AndroidRuntime(5581): Shutting down VM

06-05 17:18:27.189: E/AndroidRuntime(5581): Caused by: java.lang.RuntimeException: Couldn't find content container view
06-05 17:18:27.189: E/AndroidRuntime(5581): at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:1054)
06-05 17:18:27.189: E/AndroidRuntime(5581): at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:919)
06-05 17:18:27.189: E/AndroidRuntime(5581): at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
06-05 17:18:27.189: E/AndroidRuntime(5581): at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:218)
06-05 17:18:27.189: E/AndroidRuntime(5581): at com.test.MainActivity.onCreate(MainActivity.java:85)

Thank you!

Andrea D'Alessandro

unread,
Jun 10, 2012, 12:18:33 PM6/10/12
to actionba...@googlegroups.com
Nevermind! At last I've sorted this out. I had a "raw" folder inside res which contained the db of the app. So I just removed the folder and the actionbar worked again. Now the problem is that I need the raw...


Il giorno mercoledì 25 aprile 2012 02:20:47 UTC+2, Luke Monahan ha scritto:

Jonathan Steele

unread,
Jun 10, 2012, 1:39:27 PM6/10/12
to actionba...@googlegroups.com
you could put it in assets folder.

Andrea D'Alessandro

unread,
Jun 10, 2012, 1:54:00 PM6/10/12
to actionba...@googlegroups.com
Even there, it doesn't work!

Jake Wharton

unread,
Jun 17, 2012, 3:04:52 AM6/17/12
to actionba...@googlegroups.com
Did you clean the project before exporting? Sounds like the R.java IDs are messed up.

---
Jake Wharton
http://about.me/jakewharton
Reply all
Reply to author
Forward
0 new messages