ActionBarSherlock for API 8

575 views
Skip to first unread message

Felix Wackernagel

unread,
Nov 29, 2011, 7:52:48 AM11/29/11
to ActionBarSherlock
Hello Guys,
it is possible to develop on api 8 with ActionBarSherlock?

I build the library on api 13 but if i import it in my project with
api 8, i cant find my generated R file.

Jake Wharton

unread,
Nov 29, 2011, 8:00:32 AM11/29/11
to actionba...@googlegroups.com
You have to compile against API 13 in order to provide the library access to classes and styles from Android 3.2. You can still set the minSdkVersion in your manifest as low as API 4. You only need to take care that you do not use methods from newer API levels than your minimum when developing your app.

Take a look at the sample projects for more information as each one targets API 13 but will run just fine on API 4.

---
Jake Wharton
http://about.me/jakewharton

Felix Wackernagel

unread,
Nov 29, 2011, 3:41:12 PM11/29/11
to ActionBarSherlock
Thank you for your tipp.
I used api level 8 for my project and include the sherlock library
under api level 13.
The result was horrible.

I changed the api level of my project to 13 and now i can run my
project under api level 8 to 13.

On 29 Nov., 14:00, Jake Wharton <jakewhar...@gmail.com> wrote:
> You have to compile against API 13 in order to provide the library access
> to classes and styles from Android 3.2. You can still set the

> minSdkVersionin your manifest as low as API 4. You only need to take


> care that you do
> not use methods from newer API levels than your minimum when developing
> your app.
>
> Take a look at the sample projects for more information as each one targets
> API 13 but will run just fine on API 4.
>
> ---

> Jake Whartonhttp://about.me/jakewharton

Dmitry Ogievich

unread,
Dec 1, 2011, 5:02:49 PM12/1/11
to ActionBarSherlock
Hi Jake,

If I understood correctly ActionBarSherlock 3.4.0 will compile only in
case if we set Android Target Platform of version 3.2+. It means that
developer is obliged to build his application also with API 13.
Does it mean that such application will work fine for the phones with
Android 2.1 in case developer will use only ActionBarSherlock classes
and won't use Android framework classes from version 3.2?

Could you please confirm that?

Thanks in advance.

On Nov 29, 4:00 pm, Jake Wharton <jakewhar...@gmail.com> wrote:
> You have to compile against API 13 in order to provide the library access
> to classes and styles from Android 3.2. You can still set the

> minSdkVersionin your manifest as low as API 4. You only need to take


> care that you do
> not use methods from newer API levels than your minimum when developing
> your app.
>
> Take a look at the sample projects for more information as each one targets
> API 13 but will run just fine on API 4.
>
> ---

> Jake Whartonhttp://about.me/jakewharton

Graham Smith

unread,
Dec 1, 2011, 5:05:29 PM12/1/11
to actionba...@googlegroups.com
I am not Jake but I can answer.

If you read
http://developer.android.com/guide/publishing/versioning.html#minsdkversion

You can specify a minimum SDK version as well as a target. This will allow
you to allow target level 8 devices to run your application while targeting
those at API level 13.

Hope that helps

Graham Smith

unread,
Dec 1, 2011, 5:10:55 PM12/1/11
to actionba...@googlegroups.com
Here is an example of what could be in your manifest:

<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="13" />

Jake Wharton

unread,
Dec 1, 2011, 5:14:59 PM12/1/11
to actionba...@googlegroups.com

Have a look at the samples too. They all work 1.6+. The styled sample also uses platform-specific code for animation.

---
Jake Wharton
http://about.me/jakewharton

Dmitry Ogievich

unread,
Dec 2, 2011, 6:05:24 PM12/2/11
to ActionBarSherlock
Thank you Graham and Jake for the clarifications!

Now it is clear for me.
I would suggest to add my question and your answer to the FAQ list on
the official ActionBarSherlock website, because I didn't find the
appropriate answer anywhere.

--
Dmitry Ogievich

On Dec 2, 1:14 am, Jake Wharton <jakewhar...@gmail.com> wrote:
> Have a look at the samples too. They all work 1.6+. The styled sample also
> uses platform-specific code for animation.
>
> ---

> Jake Whartonhttp://about.me/jakewharton


> On Dec 1, 2011 5:11 PM, "Graham Smith" <gra...@wiseman-designs.com> wrote:
>
>
>
>
>
>
>
> > Here is an example of what could be in your manifest:
>
> >    <uses-sdk
> >        android:minSdkVersion="4"
> >        android:targetSdkVersion="13" />
>
> > -----Original Message-----
> > From: Graham Smith [mailto:gra...@wiseman-designs.com]
> > Sent: 01 December 2011 22:05
> > To: actionba...@googlegroups.com
> > Subject: RE: ActionBarSherlock for API 8
>
> > I am not Jake but I can answer.
>
> > If you read

> >http://developer.android.com/guide/publishing/versioning.html#minsdkv...

Graham Smith

unread,
Dec 2, 2011, 6:33:14 PM12/2/11
to actionba...@googlegroups.com
If Jake doesnt mind I am going to either create video or image based tutorials on my blog.

I agree about faq.

Sent from my HTC

Jake Wharton

unread,
Dec 2, 2011, 7:43:54 PM12/2/11
to actionba...@googlegroups.com

That would be fantastic. Unfortunately that is one thing that I just haven't had time to do. Please send the link if you do. I would love to share it with other users as well.

---
Jake Wharton
http://about.me/jakewharton

Shekhar Kumar

unread,
Jun 3, 2014, 5:35:27 AM6/3/14
to actionba...@googlegroups.com

// Build Label: htc_wwe/htc_ace/ace:2.3.5/GRJ90/$:user/release-keys
// Build Changelist: 199157.1
// Build Time: 1320908049000
// java.lang.NullPointerException
//      at com.actionbarsherlock.internal.view.menu.ActionMenuPresenter.flagActi
onItems(ActionMenuPresenter.java:395)
//      at com.actionbarsherlock.internal.view.menu.ActionMenuPresenter.setWidth
Limit(ActionMenuPresenter.java:168)
//      at com.actionbarsherlock.internal.widget.ActionBarView.setMenu(ActionBar
View.java:401)
//      at com.actionbarsherlock.internal.ActionBarSherlockCompat.preparePanel(A
ctionBarSherlockCompat.java:476)
//      at com.actionbarsherlock.internal.ActionBarSherlockCompat.dispatchInvali
dateOptionsMenu(ActionBarSherlockCompat.java:274)
//      at com.actionbarsherlock.app.SherlockFragmentActivity.invalidateOptionsM
enu(SherlockFragmentActivity.java:139)
//      at com.actionbarsherlock.app.SherlockFragmentActivity.supportInvalidateO
ptionsMenu(SherlockFragmentActivity.java:146)
//      at android.support.v4.app.Fragment.setHasOptionsMenu(Fragment.java:803)
//      at com.olivoip.dialer.ui.calllog.CallLogListFragment.onActivityCreated(C
allLogListFragment.java:78)
//      at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:
1508)
//      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManage
r.java:947)
//      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManage
r.java:1104)
//      at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
//      at android.support.v4.app.FragmentManagerImpl.execPendingActions(Fragmen
tManager.java:1467)
//      at android.support.v4.app.FragmentManagerImpl.executePendingTransactions
(FragmentManager.java:472)
//      at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPage
rAdapter.java:141)
//      at android.support.v4.view.ViewPager.populate(ViewPager.java:1068)
//      at android.support.v4.view.ViewPager.populate(ViewPager.java:914)
//      at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1436)
//      at android.view.View.measure(View.java:8553)
//      at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3261)
//      at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.jav
a:1017)
//      at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
//      at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
//      at android.view.View.measure(View.java:8553)
//      at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3261)
//      at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
//      at android.view.View.measure(View.java:8553)
//      at android.widget.LinearLayout.measureVertical(LinearLayout.java:531)
//      at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
//      at android.view.View.measure(View.java:8553)
//      at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3261)
//      at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
//      at android.view.View.measure(View.java:8553)
//      at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3261)
//      at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
//      at android.view.View.measure(View.java:8553)
//      at android.view.ViewRoot.performTraversals(ViewRoot.java:915)
//      at android.view.ViewRoot.handleMessage(ViewRoot.java:1991)
//      at android.os.Handler.dispatchMessage(Handler.java:99)
//      at android.os.Looper.loop(Looper.java:150)
//      at android.app.ActivityThread.main(ActivityThread.java:4385)
//      at java.lang.reflect.Method.invokeNative(Native Method)
//      at java.lang.reflect.Method.invoke(Method.java:507)
//      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit
.java:849)
//      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
//      at dalvik.system.NativeStart.main(Native Method)



please help to solve this crashes only in htc desire 2.3 version 
 
Reply all
Reply to author
Forward
0 new messages