Android Question AHSwipeToRefresh for WebView is crashed

peacemaker

Expert
Licensed User
Longtime User
HI, All

This lib was used for pull-to-refresh WebView app, it was refreshed OK by the color circle.
But now it gets error at Layout loading:
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 45 (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 ru.gboinside.main._activity_create(main.java:403)
    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 ru.gboinside.main.afterFirstLayout(main.java:104)
    at ru.gboinside.main.access$000(main.java:17)
    at ru.gboinside.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7356)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
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.IllegalAccessError: Illegal class access: 'androidx.swiperefreshlayout.widget.SwipeRefreshLayout' attempting to access 'androidx.core.widget.MaterialProgressDrawable' (declaration of 'androidx.swiperefreshlayout.widget.SwipeRefreshLayout' appears in base.apk)
    at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.createProgressView(SwipeRefreshLayout.java:330)
    at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.<init>(SwipeRefreshLayout.java:302)
    at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.<init>(SwipeRefreshLayout.java:274)
    at de.amberhome.strefresh.base.CustomSwipeRefreshLayout.<init>(CustomSwipeRefreshLayout.java:18)
    at de.amberhome.strefresh.AHSwipeToRefresh.innerInitialize(AHSwipeToRefresh.java:53)
    at de.amberhome.strefresh.AHSwipeToRefresh._initialize(AHSwipeToRefresh.java:46)
    ... 21 more
** Activity (main) Resume **

How to be ? The WebView standard way of pull-and-refresh is exactly this circle is required...
 

peacemaker

Expert
Licensed User
Longtime User
targetSdkVersion was 26 always recently when it was compiled OK.
If to set it to 19 - the same error.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Always updated, today also updated. This error can be also found on the forum
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Erel,
Here the project to debug, please, try.
Now no solution for WebView to have the standard looking pull-to-refresh.
 

Attachments

  • 0.2.zip
    58.3 KB · Views: 239
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
hi, All
Maybe any solution for now ? Who used SwipeToRefresh recently ?
 
Upvote 0
Top