Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xamarin Forms v2.3.5.233-pre1 Incompatibility #22

Closed
ghost opened this issue Apr 15, 2017 · 14 comments
Closed

Xamarin Forms v2.3.5.233-pre1 Incompatibility #22

ghost opened this issue Apr 15, 2017 · 14 comments

Comments

@ghost
Copy link

ghost commented Apr 15, 2017

Hello!

I really love how this control helps in creating a pull to refreshlayout on a scrollview
Unfortunately, the recent Xamarin.Forms pre1 release killed this package

Here's my android stacktrace:

04-15 18:13:07.923 I/MonoDroid(10443): UNHANDLED EXCEPTION: 04-15 18:13:07.982 I/MonoDroid(10443): Java.Lang.AbstractMethodError: Exception of type 'Java.Lang.AbstractMethodError' was thrown. 04-15 18:13:07.982 I/MonoDroid(10443): at Refractored.XamForms.PullToRefresh.Droid.PullToRefreshLayoutRenderer.get_View () [0x00005] in <84c3d75aa20d4387af5df3cee5f75b5f>:0 04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.VisualElementTracker..ctor (Xamarin.Forms.Platform.Android.IVisualElementRenderer renderer) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsViewPager.cs:26 04-15 18:13:07.982 I/MonoDroid(10443): at Refractored.XamForms.PullToRefresh.Droid.PullToRefreshLayoutRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00057] in <84c3d75aa20d4387af5df3cee5f75b5f>:0 04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\EntryRenderer.cs:50 04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\FastRenderers\GestureManager.cs:54 04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\FastRenderers\LabelRenderer.cs:38 04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\FastRenderers\GestureManager.cs:46 04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\FastRenderers\ImageRenderer.cs:134
04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00026] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\FastRenderers\VisualElementRenderer.cs:96 04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0002d] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\FastRenderers\LabelRenderer.cs:292
04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Support.V4.App.FragmentManager fragmentManager) [0x0001b] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\EntryRenderer.cs:131
04-15 18:13:07.982 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.AppCompat.FragmentContainer.OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) [0x00006] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Resource.cs:28
04-15 18:13:07.982 I/MonoDroid(10443): at Android.Support.V4.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_inflater, System.IntPtr native_container, System.IntPtr native_savedInstanceState) [0x00022] in <425a51a3c9ba434799fb42d09e18fd4b>:0
04-15 18:13:07.982 I/MonoDroid(10443): at (wrapper dynamic-method) System.Object:afbdc118-b9ed-4e41-8fd2-954205a737d9 (intptr,intptr,intptr,intptr,intptr)
04-15 18:13:07.982 I/MonoDroid(10443): --- End of managed Java.Lang.AbstractMethodError stack trace ---
04-15 18:13:07.982 I/MonoDroid(10443): java.lang.AbstractMethodError
04-15 18:13:07.982 I/MonoDroid(10443): at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.n_onCreateView(Native Method)
04-15 18:13:07.982 I/MonoDroid(10443): at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.onCreateView(FragmentContainer.java:51)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
04-15 18:13:07.982 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.Fragment.performStart(Fragment.java:2214)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1340)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
04-15 18:13:07.983 I/MonoDroid(10443): at android.support.v4.app.FragmentActivity.onResume(FragmentActivity.java:488)
04-15 18:13:07.983 I/MonoDroid(10443): at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onResume(Native Method)
04-15 18:13:07.983 I/MonoDroid(10443): at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onResume(FormsAppCompatActivity.java:113)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1270)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.Activity.performResume(Activity.java:6783)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3421)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3484)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2747)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.ActivityThread.-wrap12(ActivityThread.java)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
04-15 18:13:07.983 I/MonoDroid(10443): at android.os.Handler.dispatchMessage(Handler.java:102)
04-15 18:13:07.983 I/MonoDroid(10443): at android.os.Looper.loop(Looper.java:154)
04-15 18:13:07.983 I/MonoDroid(10443): at android.app.ActivityThread.main(ActivityThread.java:6176)
04-15 18:13:07.983 I/MonoDroid(10443): at java.lang.reflect.Method.invoke(Native Method)
04-15 18:13:07.983 I/MonoDroid(10443): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
04-15 18:13:07.983 I/MonoDroid(10443): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
04-15 18:13:07.983 I/MonoDroid(10443):
04-15 18:13:07.988 D/Mono (10443): DllImport searching in: '__Internal' ('(null)').
04-15 18:13:07.988 D/Mono (10443): Searching for 'java_interop_jnienv_throw'.
04-15 18:13:07.988 D/Mono (10443): Probing 'java_interop_jnienv_throw'.
04-15 18:13:07.988 D/Mono (10443): Found as 'java_interop_jnienv_throw'.
04-15 18:13:08.754 I/MonoDroid(10443): UNHANDLED EXCEPTION:
04-15 18:13:08.774 I/MonoDroid(10443): Java.Lang.AbstractMethodError: Exception of type 'Java.Lang.AbstractMethodError' was thrown.
04-15 18:13:08.774 I/MonoDroid(10443): at (wrapper managed-to-native) Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_void_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*)
04-15 18:13:08.774 I/MonoDroid(10443): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0008f] in /Users/builder/data/lanes/4009/9578cdcd/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12079
04-15 18:13:08.774 I/MonoDroid(10443): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00068] in /Users/builder/data/lanes/4009/9578cdcd/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:31
04-15 18:13:08.775 I/MonoDroid(10443): at Android.App.Activity.OnResume () [0x00000] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Android.App.Activity.cs:4201
04-15 18:13:08.775 I/MonoDroid(10443): at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnResume () [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\FormsApplicationActivity.cs:187
04-15 18:13:08.775 I/MonoDroid(10443): at Android.App.Activity.n_OnResume (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Android.App.Activity.cs:4191
04-15 18:13:08.775 I/MonoDroid(10443): at (wrapper dynamic-method) System.Object:72a881d2-65be-40eb-a716-1a8a96cf2714 (intptr,intptr)
04-15 18:13:08.775 I/MonoDroid(10443): --- End of managed Java.Lang.AbstractMethodError stack trace ---
04-15 18:13:08.775 I/MonoDroid(10443): java.lang.AbstractMethodError
04-15 18:13:08.775 I/MonoDroid(10443): at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.n_onCreateView(Native Method)
04-15 18:13:08.775 I/MonoDroid(10443): at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.onCreateView(FragmentContainer.java:51)
04-15 18:13:08.775 I/MonoDroid(10443): at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192)
04-15 18:13:08.775 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
04-15 18:13:08.775 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
04-15 18:13:08.775 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
04-15 18:13:08.775 I/MonoDroid(10443): at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
04-15 18:13:08.775 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
04-15 18:13:08.775 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.Fragment.performStart(Fragment.java:2214)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1340)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
04-15 18:13:08.776 I/MonoDroid(10443): at android.support.v4.app.FragmentActivity.onResume(FragmentActivity.java:488)
04-15 18:13:08.776 I/MonoDroid(10443): at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onResume(Native Method)
04-15 18:13:08.776 I/MonoDroid(10443): at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onResume(FormsAppCompatActivity.java:113)
04-15 18:13:08.776 I/MonoDroid(10443): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1270)
04-15 18:13:08.777 I/MonoDroid(10443): at android.app.Activity.performResume(Activity.java:6783)
04-15 18:13:08.777 I/MonoDroid(10443): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3421)
04-15 18:13:08.777 I/MonoDroid(10443): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3484)
04-15 18:13:08.777 I/MonoDroid(10443): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2747)
04-15 18:13:08.777 I/MonoDroid(10443): at android.app.ActivityThread.-wrap12(ActivityThread.java)
04-15 18:13:08.777 I/MonoDroid(10443): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
04-15 18:13:08.777 I/MonoDroid(10443): at android.os.Handler.dispatchMessage(Handler.java:102)
04-15 18:13:08.777 I/MonoDroid(10443): at android.os.Looper.loop(Looper.java:154)
04-15 18:13:08.777 I/MonoDroid(10443): at android.app.ActivityThread.main(ActivityThread.java:6176)
04-15 18:13:08.777 I/MonoDroid(10443): at java.lang.reflect.Method.invoke(Native Method)
04-15 18:13:08.777 I/MonoDroid(10443): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
04-15 18:13:08.777 I/MonoDroid(10443): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
04-15 18:13:08.777 I/MonoDroid(10443): `

Only fix is not to update xamarin forms to the v2.3.5.233-pre1 release

Thank you so much for checking it out!

@BenDevelopment
Copy link

Has anyone found a solution or a workaround?

@leeanpeng
Copy link

leeanpeng commented Jun 19, 2017

Is there any update for this issue?

@ericbrunner
Copy link

Have the same with Xamarin.Forms v.2.3.5.256-pre6. I posted my stacktrace here on Gist.

@ericbrunner
Copy link

I filed a Xf bug: https://bugzilla.xamarin.com/show_bug.cgi?id=57921

@roycornelissen
Copy link

Yep, ran into this too today. Would be interested to learn what the root cause is.

@ericbrunner
Copy link

I got that information from Xamarin Team Team (jimmy.garrido@xamarin.com):

This appears related to the deprecation of IVisualElementRenderer.ViewGroup in Android[1]. VisualElementTracker now accesses View instead of ViewGroup[2] and since PullToRefreshLayoutRenderer[3] has not implemented it, it throws a Java.Lang.AbstractMethodError.

The PullToRefreshLayout component will need to be updated to 2.3.5 and implement IVisualElementRenderer.View.

[1] https://releases.xamarin.com/pre-release-xamarin-forms-2-3-5-256-pre6/
[2] /~https://github.com/xamarin/Xamarin.Forms/blob/2.3.5/Xamarin.Forms.Platform.Android/VisualElementTracker.cs#L36
[3] /~https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout/blob/master/PullToRefresh/PullToRefresh.Droid/PullToRefreshLayoutRenderer.cs

@jamesmontemagno
Copy link
Owner

Makes some sense, I will look into it,

@ericbrunner
Copy link

@jamesmontemagno Great. Thanks!

@Troto
Copy link

Troto commented Jul 6, 2017

Also had this issue just now, thanks for getting onto it!

@jamesmontemagno
Copy link
Owner

Fixed in 2.0 alpha, required 2.3.5-pre6

@ericbrunner
Copy link

ericbrunner commented Jul 10, 2017

Can confirm that 2.0.0-alpha10 works when in .NET Standard library, Version=1.4 and all xplat projects XF SDK 2.3.5.256-pre6 is installed.

@BenDevelopment
Copy link

Works for me too, thanks @jamesmontemagno (but I figured out that your beta version is older than your alpha, should not it be the opposite?).

@jamesmontemagno
Copy link
Owner

I think beta goes before alpha in their order. I removed the beta though, so should be better now . :)

@KennyDizi
Copy link

thanks so much @jamesmontemagno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants