-
Notifications
You must be signed in to change notification settings - Fork 52
Static PreferenceManager.GetDefaultSharedPreferences missing. #41
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
Comments
Getting same issue Xamarin.AndroidX.Preference 1.1.0-rc1 |
@YevgenijZ in my generated code:
So |
@moljac |
This
?? |
@auedbaki https://www.nuget.org/packages/Xamarin.AndroidX.Preference/1.1.0-rc1 Generated code:
|
I'm using Androidx.Preferences from NuGet - pre version "-rc1" and GetDefaultSharedPreferences is missing, dotPeek does not show presence of this method either, method was available in pre version "-preview06". Maybe something wrong was uploaded to NuGet? |
We work on our bindings tools too, so that might be the reason. I don't think that nuget upload/publishing would mess something up. I will close this issue. Methods/properties should appear in |
@moljac On register and unregister using this code:
Getting error about SharedPreferences from PreferenceScreen |
@moljac |
@YevgenijZ I cannot delist packages. What else is missing? |
@auedbaki Regarding |
Alright then. Makes sense to close this issue when fix will be confirmed though to have public information that rc1 is missing something. Anyway i'm happy that you see the problem and it will be fixed. |
Decompiled java:
|
@moljac You are right this is not the issue with PreferenceScreen, I just check the Original Docs from Google, and can say PreferenceScreen Class is Clean, and has no bug. May be it can be the issue of Binding Tools too. |
PreferenceScreen is derived from PreferenceGroup and therefore Preference and Preference should contain getSharedPreferences (SharedPreference in C#). |
Can you check NOTE: seems that the class is still missing. Not sure. There is duplicate issue with the details. Method is generated locally, but seems not to be generated on the CI servers during build and publish. This points out on the different tooling versions. |
Duplicate |
@moljac Did you mean check rc2? Yes, rc2 has same problem, method is missing. |
Related: |
Related: CI servers should use 16.5 P2 |
Bumped Xamarin to 16.5 on CI bots https://github.com/xamarin/AndroidX/blob/master/azure-pipelines.yml#L29 |
Both MacOSX and Windows Azure DevOps (CI) build servers are generating correct code now. Fixed in: https://github.com/xamarin/AndroidX/releases/tag/AndroidX-rc3 Waiting for Americans to wake up, so somebody will press the green button to publish nuget[s]. Please provide feedback whether the issue is fixed. Even better close it yourself. Thanks |
GetDefaultSharedPreferences is back in rc3. It's alright to close issue. Thanks! |
Yes, It's working now. You can close this issue. |
Will leave it for a bit to get more info. @auedbaki Thanks |
Closing it. Preparing stable |
Xamarin.Android Version (eg: 6.0):
Microsoft Visual Studio Community 2019
Version 16.4.2
Microsoft .NET Framework
Version 4.8.03752
Xamarin.Android SDK 10.1.1.0 (d16-4/f2c9364)
Operating System & Version (eg: Mac OSX 10.11):
Windows 10 (1909)
Support Libraries Version (eg: 23.3.0):
Xamarin.AndroidX.Preference 1.1.0-rc1
Describe your Issue:
PreferenceManager.GetDefaultSharedPreferences(this.context)
Error CS0117 'PreferenceManager' does not contain a definition for 'GetDefaultSharedPreferences'
The only static member available on PreferenceManager is SetDefaultValues (and the ones from base Object).
The text was updated successfully, but these errors were encountered: