Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69

8 posts, 0 answers
  1. Petrushka
    Petrushka avatar
    8 posts
    Member since:
    Oct 2011

    Posted 27 May 2019 Link to this post

    Hi!

    Here is my example application: https://drive.google.com/open?id=1HtD5CNjyibRtnQ6dVikYpvuluGgeLEyF

    I have a MasterDetailPage as default MainPage.

    There is a RadListView in the MenuPage, and a Button in the DetailPage.

    When the Button is clicked, it will set MainPage to a new ContentPage( e.g. Application.Current.MainPage = new NewMainPage(); ), then an unhandled exception occcured.

    How to fix this problem?

    Unhandled Exception:

    05-28 03:40:38.649 D/Mono    ( 1267): Loading reference 6 of Mono.Android.dll asmctx DEFAULT, looking for System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    05-28 03:40:38.649 D/Mono    ( 1267): Image addref System.Runtime.Serialization[0x8456d220] (asmctx DEFAULT) -> System.Runtime.Serialization.dll[0x83ca4e00]: 2
    05-28 03:40:38.650 D/Mono    ( 1267): Prepared to set up assembly 'System.Runtime.Serialization' (System.Runtime.Serialization.dll)
    05-28 03:40:38.650 D/Mono    ( 1267): Assembly System.Runtime.Serialization[0x8456d220] added to domain RootDomain, ref_count=1
    05-28 03:40:38.650 D/Mono    ( 1267): AOT: image 'System.Runtime.Serialization.dll.so' not found: dlopen failed: library "System.Runtime.Serialization.dll.so" not found
    05-28 03:40:38.650 D/Mono    ( 1267): AOT: image '/Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Runtime.Serialization.dll.so" not found
    05-28 03:40:38.650 D/Mono    ( 1267): Config attempting to parse: 'System.Runtime.Serialization.dll.config'.
    05-28 03:40:38.650 D/Mono    ( 1267): Config attempting to parse: '/Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/sdks/out/android-x86-release/etc/mono/assemblies/System.Runtime.Serialization/System.Runtime.Serialization.config'.
    05-28 03:40:38.650 D/Mono    ( 1267): Assembly Ref addref Mono.Android[0x9cd41220] -> System.Runtime.Serialization[0x8456d220]: 2
    05-28 03:40:38.650 D/Mono    ( 1267): Loading reference 0 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    05-28 03:40:38.650 D/Mono    ( 1267): Assembly Ref addref System.Runtime.Serialization[0x8456d220] -> mscorlib[0x9cd3f4e0]: 73
    Loaded assembly: System.Runtime.Serialization.dll [External]
    Unhandled Exception:
     
    System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d).
     
    05-28 03:40:40.602 D/Mono    ( 1267): DllImport attempting to load: '/system/lib/liblog.so'.
    05-28 03:40:40.603 D/Mono    ( 1267): DllImport loaded library '/system/lib/liblog.so'.
    05-28 03:40:40.603 D/Mono    ( 1267): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
    05-28 03:40:40.603 D/Mono    ( 1267): Searching for '__android_log_print'.
    05-28 03:40:40.603 D/Mono    ( 1267): Probing '__android_log_print'.
    05-28 03:40:40.603 D/Mono    ( 1267): Found as '__android_log_print'.
    05-28 03:40:40.605 I/MonoDroid( 1267): UNHANDLED EXCEPTION:
    05-28 03:40:40.606 I/MonoDroid( 1267): System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d). ---> System.MissingMethodException: No constructor found for Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
    05-28 03:40:40.606 I/MonoDroid( 1267):    --- End of inner exception stack trace ---
    05-28 03:40:40.606 I/MonoDroid( 1267):   at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.606 I/MonoDroid( 1267):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.606 I/MonoDroid( 1267):    --- End of inner exception stack trace ---
    05-28 03:40:40.606 I/MonoDroid( 1267):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00182] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.606 I/MonoDroid( 1267):   at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000c1] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.606 I/MonoDroid( 1267):   at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Android.Views.View.get_Parent () [0x0001f] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].UpdateParentPageTraversalOrder () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:399
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00116] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:369
    05-28 03:40:40.607 I/MonoDroid( 1267):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:211
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:353
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x00094] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:210
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:335
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.ViewCell.set_View (Xamarin.Forms.View value) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\Cells\ViewCell.cs:25
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Telerik.XamarinForms.DataControlsRenderer.Android.FormsListViewDataSourceAdapterBase.ClearCachedViews () [0x0003d] in <54bca44b8fc84b77a4760736d165085c>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Telerik.XamarinForms.DataControlsRenderer.Android.RadListViewDataSourceAdapter.ClearCachedViews () [0x00000] in <54bca44b8fc84b77a4760736d165085c>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Telerik.XamarinForms.DataControlsRenderer.Android.RadListViewDataSourceAdapter.Dispose (System.Boolean disposing) [0x00003] in <54bca44b8fc84b77a4760736d165085c>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Object.Dispose () [0x00000] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer.OnElementDetached (Telerik.XamarinForms.DataControls.RadListView oldElement) [0x0003c] in <54bca44b8fc84b77a4760736d165085c>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Telerik.XamarinForms.Common.Android.AndroidRendererBase`2[S,T].Dispose (System.Boolean disposing) [0x0002d] in <4164515d6fbe493ba6368ab0a3de92cc>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Object.Dispose () [0x00000] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x000a4] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:312
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.Platform+DefaultRenderer.Dispose (System.Boolean disposing) [0x0000a] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1280
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Object.Dispose () [0x00000] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x000a4] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:312
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.PageRenderer.Dispose (System.Boolean disposing) [0x00011] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\PageRenderer.cs:44
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Object.Dispose () [0x00000] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.MasterDetailContainer.DisposeChildRenderers () [0x0000b] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:114
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.MasterDetailContainer.Dispose (System.Boolean disposing) [0x00009] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:91
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer.Dispose (System.Boolean disposing) [0x00076] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailContainer.cs:152
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Object.Dispose () [0x00000] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose (System.Boolean disposing) [0x00095] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:233
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Object.Dispose () [0x00000] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.AppCompat.Platform.Cleanup (System.Collections.Generic.List`1[T] viewsToRemove, System.Collections.Generic.List`1[T] renderersToDispose) [0x00036] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:338
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal (Xamarin.Forms.Page newRoot) [0x000b9] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:322
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Xamarin.Forms.Platform.Android.AppCompat.Platform+<>c__DisplayClass36_0.<SetPage>b__0 () [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:269
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:40.607 I/MonoDroid( 1267):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
    05-28 03:40:40.611 W/zygote  ( 1267): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
    05-28 03:40:40.613 D/Mono    ( 1267): DllImport searching in: '__Internal' ('(null)').
    05-28 03:40:40.613 D/Mono    ( 1267): Searching for 'java_interop_jnienv_throw'.
    05-28 03:40:40.613 D/Mono    ( 1267): Probing 'java_interop_jnienv_throw'.
    05-28 03:40:40.613 D/Mono    ( 1267): Found as 'java_interop_jnienv_throw'.
    Unhandled Exception:
     
    System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d).
     
    05-28 03:40:41.142 E/mono    ( 1267):
    05-28 03:40:41.142 E/mono    ( 1267): Unhandled Exception:
    05-28 03:40:41.142 E/mono    ( 1267): System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d). ---> System.MissingMethodException: No constructor found for Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
    05-28 03:40:41.142 E/mono    ( 1267):    --- End of inner exception stack trace ---
    05-28 03:40:41.142 E/mono    ( 1267):   at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:41.142 E/mono    ( 1267):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:41.142 E/mono    ( 1267):    --- End of inner exception stack trace ---
    05-28 03:40:41.142 E/mono    ( 1267):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
    05-28 03:40:41.142 E/mono    ( 1267):   at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
    05-28 03:40:41.142 E/mono-rt ( 1267): [ERROR] FATAL UNHANDLED EXCEPTION: System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d). ---> System.MissingMethodException: No constructor found for Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
    05-28 03:40:41.142 E/mono-rt ( 1267):    --- End of inner exception stack trace ---
    05-28 03:40:41.142 E/mono-rt ( 1267):   at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:41.142 E/mono-rt ( 1267):   at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <a6696dd5fce04f5480364911ef1529f2>:0
    05-28 03:40:41.142 E/mono-rt ( 1267):    --- End of inner exception stack trace ---
    05-28 03:40:41.142 E/mono-rt ( 1267):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
    05-28 03:40:41.142 E/mono-rt ( 1267):   at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
    05-28 03:40:41.143 D/        ( 1267): HostConnection::get() New Host Connection established 0x8407c540, tid 1267

  2. Keivan Kechmiri
    Keivan Kechmiri avatar
    10 posts
    Member since:
    Aug 2009

    Posted 28 May 2019 Link to this post

    Same problem, please advise.
  3. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1168 posts

    Posted 28 May 2019 Link to this post

    Hi Petrushka and Keivan,

    This is because those projects are probably being compiled with the recently released Xamarin.Forms v4.0. You can avoid this problem by updating the project's packages to Xamarin.Forms 3.6.

    We are investigating the underlying cause and are working to add support for XF 4.0. However, for now, UI for Xamarin R2 2019 needs v3.6 until we release a service pack with a solution.

    You can follow the development team's progress in the UI for Xamarin Feedback Item - Crash When Updating To Xamarin.Forms 4.0 (click the "Follow" button to be notified when the status changes).

    Thank you for your patience and understanding.

    Regards,
    Lance | Technical Support Engineer, Principal
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  4. Petrushka
    Petrushka avatar
    8 posts
    Member since:
    Oct 2011

    Posted 28 May 2019 in reply to Lance | Manager Technical Support Link to this post

     

    Thanks for your reply. I will follow the progress of this problem.

    Currently my workaround is set ItemTemplate to null, before change MainPage to a new ContentPage:

    RadListView listView = masterDetailPage.Master.FindByName<RadListView>( "mainMenuList" );
     
    if( listView != null )
    {
        listView.ItemTemplate = null;
    }
  5. Miqueias
    Miqueias avatar
    1 posts
    Member since:
    May 2019

    Posted 02 Sep 2019 Link to this post

    Hello, I would like I have the same problem, I would like to know if a solution has already been applied to this problem?

     

    Or if anyone has an alternative to this solve this problem

    Tks

  6. Didi
    Admin
    Didi avatar
    356 posts

    Posted 03 Sep 2019 Link to this post

    Hi Miqueias,

    The issue related to Xamarin.Forms 4.0 was fixed and a fix for it is included in Release 2019.2.603.360 (R2 2019 minor release).  More details on this check the feedback item at the link below:
    https://feedback.telerik.com/xamarin/1410095-crash-when-upgrading-to-xamarin-forms-4-0

    If you are using Xamarin.Forms 4.1 some of the controls crashes with NullReferenceException when navigating back from a page with ListView, DataGrid, etc.We have this logged in our feedback and you can track its progress at the following link: https://feedback.telerik.com/xamarin/1418464-android-nullreferenceexception-is-thrown-when-navigating-back-and-using-xamarin-forms-4-1

    As a workaround you can try the one suggested here: https://www.telerik.com/forums/unable-to-activate-instance-of-type-telerik-xamarinforms-datacontrolsrenderer-android-listview-templatecellcontainer-from-native-handle-0x69#EfCfJNl3hUOe2md2ylOs4Q

    Regards,
    Didi
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Nel
    Nel avatar
    1 posts
    Member since:
    Apr 2018

    Posted 15 Oct 2019 in reply to Didi Link to this post

    Hi, I'm still having this kind of issue when navigating to page that has a radlistview and then navigating to other page makes my app crash and i'm using xamarin 4.1.

    Unhandled Exception:
     
    System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x200019 (key_handle 0xebc6e96). occurred
  8. Didi
    Admin
    Didi avatar
    356 posts

    Posted 15 Oct 2019 Link to this post

    Hi Nel,

    I am sorry to hear that this issue still occurs. Please check the public feedback item for more details. Could you please update the Xamarin.Forms and Telerik UI for Xamarin to the latest available versions and check whether the issue could be reproduced? If yes, please open a support ticket and attach a sample app or a stripped-down version of the project where the issue is represented. Also more details on which android devices/versions the exception is thrown?

    Give the suggestions a try and let me know how it goes.

    Regards,
    Didi
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top