[Bug] Android app crashes since updating to Xamarin Forms v4 #7602
Comments
From a first glance this does seem like some kind of caching issue. Make sure you updated all the projects to the same version of Xamarin.Forms, then clean the solution. To be sure delete the bin and obj folders from each of the projects as well on the filesystem. Also remove the app from the emulator or device. Do a rebuild, run and hopefully all should be resolved. Did you try any of these things already? |
I found that I had to uninstall any existing 3.0 apps on the phone and re deploy clean and build your solution then should be ok. Could well be hot reload has happened a few times for me so make sure that this is disabled. |
Hi @jfversluis these issues actually also occur on devops and appcenter, both areas clean the working area before any build I believe |
Searching for this error message it seems to have to do with the Android targeting and support packages. Did you update those as well? Could you provide some more info on what packages are installed exactly with which version and what Android version you are trying to target? |
Yes I updated my api level to Andriod 9
…On Fri, Sep 20, 2019 at 3:46 PM Gerald Versluis ***@***.***> wrote:
Searching for this error message it seems to have to do with the Google
targeting and support packages. Did you update those as well? Could you
provide some more info on what packages are installed exactly with which
version and what Android version you are trying to target?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7602?email_source=notifications&email_token=ABK34HK3EWZVVCQWHUGBMZLQKTO3PA5CNFSM4IYVWRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G5L6I#issuecomment-533583353>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABK34HLYSFLSUXVEIB5H67LQKTO3PANCNFSM4IYVWRJA>
.
--
Regards
David Buckley
M: 07871 884 546
|
i having the same issue after update to latest version, in the previous version everything works fine, but when i update the xamarin the error occurs. |
Can anyone experiencing this issue please attach a small project that demonstrates this issue? Thanks! |
I see someone with the same issue here on SO: https://stackoverflow.com/questions/58032635/updating-nuget-caused-exception-unhandled-system-typeloadexception It seems to have to do with Maps? Can someone verify this? And what Samantha said, a reproduction would be super awesome! |
I have the exact same issue, in both Android and iOS. On Android the app builds and crashes upon start up on iOS the app does not build (when targeting a real device simulator build works fine). I get the error referenced in the Stack overflow link above relating to System.Collections.Generic.Stack`1 The problem does not exist if I revert back to 4.2.0.778463 I am not sure if it is related to maps, but my app does include the Maps nuget package. |
I don't use maps, that's occur even in a fresh project |
@KennyMack would you be able to put that in a reproduction project and add that here? |
I got the same error upgrading to 4.2 SR2. |
I simply created a new empty app and also get a TypeLoadException (but without any details) in VS2017 15.9 |
with VS2019 I'm also able to compile and run the app without any issue. @jfversluis Any ideas why it fails for VS2017? Is this a Mono issue with VS2017 15.9? |
@jfversluis Here the project, i just create and update the xamarin to version 4.2.0.815419 and app crash when start |
I had the same issue using AppCenter, also using 4.2.0.815419 both iOS and Android builds failed with the same "expected class 'System.Collections.Generic.Stack" message. I changed the build configuration in AppCenter to use: SDK Version: Xamarin.iOS 12.14 and Xcode version: 10.3. |
@KennyMack I pulled down your repro and it all works fine for me |
@ryanmendoza To fix the iOS devops build, you need to use xCode 11 and Xamarin sdk 6_4_0. Add build task "Use .NET Core" to the pipeline using version 3.0.100. |
There is actually a new version now, does that fix things for you? |
This should be resolved in the latest versions of Xamarin.Forms published on NuGet. Thank you! |
which version/build number? How long will XF work for VS2017 users? |
4.2.0.848062 and 4.3.0.851321-pre3 are both compatible with VS2017. |
I can confirm that using the latest builds (mentioned above) has resolved the reported issue without the need to upgrade / change your existing tooling. |
thanks, I can confirm this. |
There is no point in getting new versions of Xamarin.Forms to work with old tooling. People who want to use old tooling can still use old versions of Xamarin.Forms. Needing to support old tooling would be a drag on development in a repo that already has too many drags on development. |
I got same issue on Xamarin.Forms.iOS version 4.3.0.991211 on MacOS Mojave |
@samhouts this issue is closed, but the problem still exists...Where is the official solution, or give to us at least the working workaround to fix this issue, please? Look at build log in Azure DevOps: Project type - Xamarin.iOS my .yaml configuration in Azure DevOps |
@beylkhanovdamir what version of Xamarin.Forms are you using? This should not happen anymore after the earlier mentioned versions |
@jfversluis It still happens to me too (Xamarin.Forms.iOS version |
@Sonic3R you are using VS2017 on Windows? VSMac? Can you give some more details? |
Visual Studio for Mac, version 8.3 |
@jfversluis you can look at my .yaml configuration in DevOps |
@beylkhanovdamir did you see this comment: #7602 (comment) I see you're setting the SDK version manually and you're using Xcode 10, you might want to look into using current versions together with the newest Forms version. @Sonic3R could you share a little bit more about what errors you are seeing in VSMac when building? What version of Xcode are you using? |
Guys i FOUND that its hot reload gets renabled disable hot reload and your
app will be fine.
…On Tue, Dec 3, 2019 at 12:47 PM Gerald Versluis ***@***.***> wrote:
@beylkhanovdamir <https://github.com/beylkhanovdamir> did you see this
comment: #7602 (comment)
<#7602 (comment)>
I see you're setting the SDK version manually and you're using Xcode 10,
you might want to look into using current versions together with the newest
Forms version.
@Sonic3R <https://github.com/Sonic3R> could you share a little bit more
about what errors you are seeing in VSMac when building?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7602?email_source=notifications&email_token=ABK34HN56WUZL3KRXAAKWVDQWZIPTA5CNFSM4IYVWRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFZIBKQ#issuecomment-561152170>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABK34HM2BQTF5PHNEBQVEFDQWZIPTANCNFSM4IYVWRJA>
.
--
Regards
David Buckley
M: 07871 884 546
|
yes, I saw, but I can't, because we have a project where target FW is .netstandard 2.0 (i.e. not 2.1 which is compatible with .net core 3.0), and in this case, I will get a lot of compilation errors. |
Hi - Getting the below error message on Visual studio 2017 supports Xamarin.iOS 12.4.0.64. Someone please assist us on this as it blocked our complete deployment process now. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): error MT2002: Failed to resolve "System.Collections.Generic.Stack`1" reference from "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" This error message comes ONLY after paring with mac which has same Xamarin.iOS, latest xCode and mono 5.18. Thanks in advance |
What does this even mean? I'm pretty confused by this, do you have example YAML you could share? What am I building with .netcore task? The iOS project.. how? I clearly am missing something. |
Since updating to 4.2.0.815419 I now get the following exception thrown at LoadApplication(new App(dbPath, builder)); within MainActivity.cs
I did also try v4.3.0.819712-pre2 in case there was a fix contained.
I will have to rollback to 3.5.0.129452 but I thought it would be useful to log the issue.
Linking is set to None. UWP app does work.
The text was updated successfully, but these errors were encountered: