Android Question Plz help in image slider project

Untitled.png
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Where is the B4AImageSlideShow library?
It's not enabled even in the case that it's present.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
The demo project that you started from looks incomplete to me.
It seems that it's missing a Class or a Library.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
I see other members with the same problem.
The missing file should be supplied by the original author of the demo.
Sorry, but we can do nothing.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
I would suggest you to create a similar solution by yourself.
This can be a good starting point:
XUI Image Slider
Hope it can help you.
 
Upvote 0

Marvel

Active Member
Licensed User
Always copy the error message you get from the logs and post it here. It will be easy for people to help that way.
 
Upvote 0
Ok thank you
This is the error message


Logger connected to: HUAWEI DUB-LX1
--------- beginning of main
--------- beginning of system
Copying updated assets files (6)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 38 (Main)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at JHS.CarouselView.main._activity_create(main.java:394)
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 JHS.CarouselView.main.afterFirstLayout(main.java:105)
at JHS.CarouselView.main.access$000(main.java:17)
at JHS.CarouselView.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:809)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7555)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
... 18 more
Caused by: java.lang.NoSuchMethodError: No virtual method addOnPageChangeListener(Landroid/support/v4/view/ViewPager$OnPageChangeListener;)V in class Landroid/support/v4/view/ViewPager; or its super classes (declaration of 'android.support.v4.view.ViewPager' appears in /data/app/JHS.CarouselView-x90pNA6IE8PpL8Und0ZkDA==/base.apk)
at main.java.com.synnapps.carouselview.CarouselView.initView(CarouselView.java:83)
at main.java.com.synnapps.carouselview.CarouselView.<init>(CarouselView.java:61)
at carouselviewwrapper.carouselViewWrapper._initialize(carouselViewWrapper.java:105)
... 21 more
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 38 (Main)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at JHS.CarouselView.main._activity_create(main.java:394)
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 JHS.CarouselView.main.afterFirstLayout(main.java:105)
at JHS.CarouselView.main.access$000(main.java:17)
at JHS.CarouselView.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:809)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7555)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
... 18 more
Caused by: java.lang.NoSuchMethodError: No virtual method addOnPageChangeListener(Landroid/support/v4/view/ViewPager$OnPageChangeListener;)V in class Landroid/support/v4/view/ViewPager; or its super classes (declaration of 'android.support.v4.view.ViewPager' appears in /data/app/JHS.CarouselView-x90pNA6IE8PpL8Und0ZkDA==/base.apk)
at main.java.com.synnapps.carouselview.CarouselView.initView(CarouselView.java:83)
at main.java.com.synnapps.carouselview.CarouselView.<init>(CarouselView.java:61)
at carouselviewwrapper.carouselViewWrapper._initialize(carouselViewWrapper.java:105)
... 21 more
** Activity (main) Resume **
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
Is main.bal visible in the Files tab of the IDE when you open the B4A project?

There should also be files in the /Object/res/layout folder and Object/res/drawable folders of the B4A project once you have unzipped the B4A project. Make sure these files are set to READ ONLY before running the B4A project for the first time else the files in the two Object/res/xxxx folders will be deleted during the first compile of the B4A project.
 
Last edited:
Upvote 0
Top