Android Question java.lang.AbstractMethodError

TonyVerberne

Member
Licensed User
Longtime User
I get the error below when I try to install my app (see attached zip file). I have searched for a solution to no avail.
Any help would be appreciated. This app is just for my personal use at this stage.
I have attached a zip file of the complete project.


Logger connected to: OPPO CPH2145
--------- beginning of main
--------- beginning of system
Copying updated assets files (38)
** Activity (main) Create, isFirst = true **
java.lang.AbstractMethodError: abstract method "void android.support.v4.view.PagerAdapter.startUpdate(android.view.View)"
at android.support.v4.view.ViewPager.populate(ViewPager.java:399)
at android.support.v4.view.ViewPager.onAttachedToWindow(ViewPager.java:563)
at android.view.View.dispatchAttachedToWindow(View.java:20731)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3509)
at android.view.ViewGroup.addViewInner(ViewGroup.java:5359)
at android.view.ViewGroup.addView(ViewGroup.java:5137)
at android.view.ViewGroup.addView(ViewGroup.java:5109)
at anywheresoftware.b4a.objects.ActivityWrapper.AddView(ActivityWrapper.java:124)
at b4a.ShoppingList.main._activity_create(main.java:782)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at b4a.ShoppingList.main.afterFirstLayout(main.java:105)
at b4a.ShoppingList.main.access$000(main.java:17)
at b4a.ShoppingList.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:263)
at android.app.ActivityThread.main(ActivityThread.java:8258)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
** Activity (main) Resume **
--------- beginning of crash
java.lang.AbstractMethodError: abstract method "void android.support.v4.view.PagerAdapter.startUpdate(android.view.View)"
at android.support.v4.view.ViewPager.populate(ViewPager.java:399)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:585)
at android.view.View.measure(View.java:25785)
at android.view.ViewGroup.measureChild(ViewGroup.java:7014)
at android.view.ViewGroup.measureChildren(ViewGroup.java:6991)
at anywheresoftware.b4a.BALayout.onMeasure(BALayout.java:81)
at android.view.View.measure(View.java:25785)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7043)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:25785)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7043)
at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:463)
at android.view.View.measure(View.java:25785)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7043)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:828)
at android.view.View.measure(View.java:25785)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3779)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2537)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2799)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2257)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8796)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1140)
at android.view.Choreographer.doCallbacks(Choreographer.java:962)
at android.view.Choreographer.doFrame(Choreographer.java:887)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1125)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:263)
at android.app.ActivityThread.main(ActivityThread.java:8258)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
 

Attachments

  • ShoppingList2.zip
    41 KB · Views: 140

TonyVerberne

Member
Licensed User
Longtime User
The fact that you see "android.support.v4.view" means that you are using an old SDK with an old library.

Download the latest version of B4A + SDK. Use TabStripViewPager.
Thanks Erel. I will try TabStripViewPager. The example code looks very helpful.
 
Upvote 0
Top