You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Application.MainPage is a Singleton TabbedPage using a TabbedPageRenderer (example code, below), Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal throws the following exceptions:
System.NotSupportedException: Unable to activate instance of type XamarinFormsSingletonRepro.Droid.SingletonTabbedPageRenderer from native handle
System.MissingMethodException: No constructor found for XamarinFormsSingletonRepro.Droid.SingletonTabbedPageRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)
This is the same error from #4325 and continues to happen in v3.6.0264807.
System.NotSupportedException: Unable to activate instance of type XamarinFormsSingletonRepro.Droid.SingletonTabbedPageRenderer from native handle 0x69 (key_handle 0x8858560). ---> System.MissingMethodException: No constructor found for XamarinFormsSingletonRepro.Droid.SingletonTabbedPageRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
at java.lang.Error: Java callstack:
at at mono.java.lang.RunnableImplementor.n_run(Native Method)
at at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
at at android.os.Handler.handleCallback(Handler.java:873)
at at android.os.Handler.dispatchMessage(Handler.java:99)
at at android.os.Looper.loop(Looper.java:193)
at at android.app.ActivityThread.main(ActivityThread.java:6669)
at at java.lang.reflect.Method.invoke(Native Method)
at at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00182] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000c1] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at Android.Views.ViewGroup.GetChildAt (System.Int32 index) [0x00036] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal (Xamarin.Forms.Page newRoot) [0x0001a] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:301
at Xamarin.Forms.Platform.Android.AppCompat.Platform+<>c__DisplayClass36_0.b__0 () [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:269
at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <2960acf2eeb24d88b5230e1e8afbdc2e>:0
at at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.27(intptr,intptr)
Steps to Reproduce
Open XamarinFormsSingletonRepro.sln
Build/deploy XamarinFormsSingletonRepro.Android to an Android device
I am using a Pixel emulator running API 28
Wait for the app to finish launching
On the Android device, tap the hardware Back button to background the app
On the Android device, tap the hardware Overview button to see backgrounded apps
On the Android device, tap XamarinFormsSingletonRepro.Android to resume the app
App crashes
Basic Information
Version with issue: Confirmed in v3.6.0264807 & v3.3.0.912540
Description
(Only applicable on Android)
When
Application.MainPage
is a Singleton TabbedPage using aTabbedPageRenderer
(example code, below),Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal
throws the following exceptions:System.NotSupportedException: Unable to activate instance of type XamarinFormsSingletonRepro.Droid.SingletonTabbedPageRenderer from native handle
System.MissingMethodException: No constructor found for XamarinFormsSingletonRepro.Droid.SingletonTabbedPageRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)
This is the same error from #4325 and continues to happen in v3.6.0264807.
Sample Code, TabbedPage
The complete sample reproduction code using Xamarin.Forms v3.6.0.344457 can be found here: https://github.com/brminnick/XamarinFormsSingletonRepro-Plugin.Badge
Sample Code, TabbedPageRenderer
Stack Trace
Steps to Reproduce
Basic Information
Reproduction Link
https://github.com/brminnick/XamarinFormsSingletonRepro-Plugin.Badge
Affected Devices
(From App Center Crash)
Environment
=== Visual Studio Enterprise 2019 for Mac ===
Version 8.0.2 (build 23)
Installation UUID: 4ac69d79-c034-474c-9629-20084c942d3c
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.6.0.2 (d16-0 / 040682909)
=== Mono Framework MDK ===
Runtime:
Mono 5.18.1.3 (2018-08/fdb26b0a445) (64-bit)
Package version: 518010003
=== NuGet ===
Version: 4.8.2.5835
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.0.0-preview3-27503-5
3.0.0-preview-27324-5
3.0.0-preview-27122-01
2.2.0
2.2.0-preview3-27014-02
2.1.9
2.1.8
2.1.6
2.1.2
2.1.1
2.0.6
2.0.5
1.1.10
1.0.13
SDK: /usr/local/share/dotnet/sdk/2.2.100/Sdks
SDK Versions:
2.2.100
2.1.505
2.1.504
2.1.500
2.1.302
2.1.301
2.1.101
2.1.4
1.1.11
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.9
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin.Android ===
Version: 9.2.0.5 (Visual Studio Enterprise)
Android SDK: /Users/bramin/Library/Android/sdk
Supported Android versions:
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.2
SDK Build Tools Version: 28.0.3
Build Information:
Mono: mono/mono@5ad371dab1b
Java.Interop: xamarin/java.interop/d16-0@c987483
LibZipSharp: grendello/LibZipSharp/master@44de300
LibZip: nih-at/libzip@b95cf3f
MXE: xamarin/mxe@b9cbb535
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@325e91a
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-0@0a7edd6
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/bramin/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 1.2.0.14
Hash: 86df26f
Branch: remotes/origin/d16-0
Build date: 2019-04-05 16:58:56 UTC
=== Apple Developer Tools ===
Xcode 10.2 (14490.120)
Build 10E125
=== Xamarin.Mac ===
Version: 5.8.0.0 (Visual Studio Enterprise)
Hash: 0aa84521
Branch: d16-0
Build date: 2019-04-02 16:01:19-0400
=== Xamarin.iOS ===
Version: 12.8.0.0 (Visual Studio Enterprise)
Hash: 0aa84521
Branch: d16-0
Build date: 2019-04-02 16:01:19-0400
=== Xamarin Designer ===
Version: 4.17.4.418
Hash: 3d086e814
Branch: remotes/origin/d16-0
Build date: 2019-04-01 09:20:10 UTC
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 800020023
Git revision: c576bb008dfe54cdcf596237e09564ebd2da4343
Build date: 2019-04-06 10:06:46+00
Build branch: master
Xamarin extensions: 2c996830618e7cb8e8be97984d643eb86f122e8d
=== Operating System ===
Mac OS X 10.14.4
Darwin 18.5.0 Darwin Kernel Version 18.5.0
Mon Mar 11 20:40:32 PDT 2019
root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
NuGet Package Management Extensions 0.17
The text was updated successfully, but these errors were encountered: