Android Question AH View Pager layout throwing errors on 28.0.0


Active Member
Licensed User
EDIT: Jump to the conclusion and partial fix here

I open this thread to ask if someone else has encountered this issue.
Setup everything as in
Try download file, and set everything up for AHViewPager library.
Update any SDK and try to build example above with "FixedTabIcon" from @corwin42 who's work btw is tremendous.
The error is below
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = false **
main_activity_create (java line: 348)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(
at example.tablayout.fixedtabsicon.main._activity_create(
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(
at example.tablayout.fixedtabsicon.main.afterFirstLayout(
at example.tablayout.fixedtabsicon.main.access$000(
at example.tablayout.fixedtabsicon.main$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(
... 14 more
Caused by: java.lang.NoSuchMethodError: No virtual method addOnTabSelectedListener(Landroid/support/design/widget/TabLayout$OnTabSelectedListener;)V in class Landroid/support/design/widget/TabLayout; or its super classes (declaration of '' appears in /data/app/example.tablayout.fixedtabsicon-e7CwkjBxWIm3lh3PiI3hrg==/base.apk)
at de.amberhome.objects.TabLayoutWrapper.innerInitialize(
at anywheresoftware.b4a.objects.ViewWrapper.Initialize(
at de.amberhome.objects.TabLayoutWrapper.Initialize(
at de.amberhome.objects.TabLayoutWrapper._initialize(
... 17 more
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
** Receiver (semails) OnReceive **
Cannot start from a receiver in debug mode.
I know my system is wrongly setup, but I don't know what to do, I tryed so many things (in reality I have a huge app who use some layouts file with AHViewPager views that throw this similar error when loaded, but previously it worked just fine until some sdk? update)
Last edited:


Licensed User
That I'm too stupid.

A simple recompile of the library against the latest 28.0.0 support libraries did the trick. I thought I had done this but it seems I made a mistake and did not copy the new library correctly. So I always tested with the old one which crashed.

Sorry that it took so long to fix this issue.
Upvote 0