-
Notifications
You must be signed in to change notification settings - Fork 8
Support for net8-android #64
Comments
Hi @rbakhshi , thank you for reporting this. We have started investigating and will let you know what we find. |
This issue has been logged internally as 221860 and is still being investigated. |
@rbakhshi , we have been able to reproduce the issue and are currently evaluating options to handle the underlying AndroidX vs. Android.Support.v4 compatibility in the ecosystem. To provide us confirmation, if you add the |
Thanks @tanderson-ld, currently out of office. Will check when I get back. |
ok @tanderson-ld I can confirm that at least the build error is now gone. For some "technical" reasons I cannot test the actual runtime behaviour right now. I needed to add these to the project file: <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.10" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.13" />
</ItemGroup> |
Thank you for looking into that and confirming it builds! We are still discussing this internally. Are those dependencies satisfactory for you as a work around for the moment? Would you mind also letting us know if with those migration dependencies in place, do you still see the |
OK tested the new build and unfortunately still fails with similar error. Here is the error when running v4.0.0 sdk with above
|
@rbakhshi , I still need to investigate that |
@rbakhshi , we've decided we're going to update our implementation to stop using monoandroid and begin using .netX.X-android. Still investigating exactly which .netX.X-android version we will use to make sure we maintain compatibility for customers. Are you currently shipping a MAUI app that was using LaunchDarkly Dotnet Client v3.1.0? Or perhaps this is a first attempt at using Launch Darkly in your application? |
@tanderson-ld we have a xamarin app using LD client which we are porting to. Net 8 and Maui. (Considering the xamarin end of life approaching) |
@rbakhshi , we are planning to target net7.0 for our library which I believe will be compatible with your project. Would you be interested in alpha testing a distribution when we have our first alpha ready? Hopefully within the next week. |
Yes, I would be interested! Thanks
|
@rbakhshi , just wanted to keep you updated. The last thing I need to do to make the alpha is to update our build and CI infrastructure. That should be the last step. I'll reach back out when I have the alpha. |
Awesome news! Thanks @tanderson-ld |
Just an update here: Running Release though, will still fail on Android Linker step. Removing reference to launchdarkly nuget stops the linker failure. this issue (dotnet/android#8208) made me suspect it could be related to launchdarkly's current nuget package |
@rbakhshi , I haven't forgotten about you! Juggling a few different priorities at the moment. |
We were using ClientSdk v3.1 and upgraded our solution to .Net 8 and this package to v4.0. After also running into the compiler error mentioned above, I reverted back to v3.1 and the app compiles now but crashes on startup. Not sure if it's related to this lib or not. Has anyone else been able to get LaunchDarkly.ClientSdk v3.1 to work with .Net 8 Android? |
A significant slowdown was caused by refactoring of our CI/CD test frameworks to use Maui, but we just got unblocked on that technical issue, so hopefully we get to an alpha soon. |
Hi @rbakhshi , we just put the alpha up on Nuget. The version is |
Hi @tanderson-ld thanks for the update. Unfortunately I am getting the same error even with
|
I do see a warning in our build related to the deprecation of AndroidClientHandler, but I haven't been able to reproduce the runtime exception you are encountering. I can update from AndroidClientHandler to AndroidMessageHandler and put out a new alpha to see if that addresses the problem for you. What Android API level are you targeting with your app? |
@rbakhshi , could you provide a snippet with your |
We released version 5.0.0-alpha.2 which uses the |
Hi @tanderson-ld , thanks for the update. I tested a clean new project and even alpha1 seems to work. That is great. Now I need to check why I still get that above error. I will try alpha2 in a bit and update you |
ok I can confirm that |
#69) **Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests) - [x] I have validated my changes against all supported platform versions Validated on Android **Related issues** #64 (comment)
Great! Thank you for your patience while we resolved it. Please let us know if you see any other issues! |
@tanderson-ld when targeting API 34 for android, the app fails when initializing launch darkly: Seems like related to this: dotnet/maui#17861
|
Hi again @rbakhshi. Just to confirm, is it the case that you do NOT encounter this issue on LD Dotnet SDK 5.0.0 and Android target API 33? Just want to make sure this truly only happens when switching to target API 34. I'm catching up on that other issue you sent, thank you for doing some digging. |
Correct. Using v5.0.0 and API 33 is fine |
I raised a separate bug for this here #89 |
Is this a support request?
no
Describe the bug
Support for .NET 8 seems to be broken (at least in case of Android)
To reproduce
Error details:
I suspect the issue is due to references to Xamarin dependencies which are no longer valid for MAUI apps. Below is list of dependencies installed by LaunchDarkly.ClientSdk
Also, you can try using v3.1.0. The application starts but
LdClient.Init
fails with following exception:Expected behavior
The application should build without any issues.
Logs
I think I added the stack trace
SDK version
version 4.0.0
Also tried version 3.1.0 and it allows building the project but fails at runtime (Exception details above)
Language version, developer tools
.NET 8.0.100-rc.2.23502.2
OS/platform
Windows 10
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: