Method 'Plugin.Settings.Abstractions.ISettings.GetValueOrDefault' not found.
See original GitHub issueI am using Xamarin.Forms 2.3.3.175. On iOS it works perfectly, yet on Android I get this message directly, without even seeing ui elements in my app.
public static string GeneralSettings
{
get
{
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
}
set
{
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
}
}
Bug
Version Number of Plugin:2.5.1.0 Device Tested On: Simulator Tested On: Accelerated x86 (default Visual Studio for Mac)
Expected Behavior
I can get a value from settings.
Actual Behavior
Before even accessing the string, I get “Method ‘Plugin.Settings.Abstractions.ISettings.GetValueOrDefault’ not found.”
Steps to reproduce the Behavior
Install the plugin in the PCL and Android. I run it, and get this error.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Access Settings | SettingsPlugin
This feature is available as the SettingsAutoKeyExtensions class with extension methods in the Plugin.Settings.Abstractions.Extensions namespace.
Read more >Xam.Plugins.Settings by James Montemagno doesn't seem ...
There is no "Save" for Xam.Plugins.Settings . Here is an example using a static class: using Plugin.Settings; using Plugin.Settings.
Read more >Configuration Management - Xamarin
The ISettings.GetValueOrDefault method is used to retrieve a setting's value from platform-specific storage. If no value is defined for the ...
Read more >Learn About User Settings In Xamarin.Forms
Additionally, it works with any Xamarin application, not just Xamarin.Forms. ... Settings plugin on all platforms through NuGet.
Read more >Customizing a Xamarin Forms Application, Part 2
AddOrUpdateValue<string>(UserPasswordKey, value); } } private static Plugin.Settings.Abstractions.ISettings AppSettings { get { return ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Thijmen What was the solution in your case? The project in #37 works.
Update By cleaning the solution the issue is now resolved
I ran into this after updating to 3.0.1 today. As @jamesmontemagno said, reinstall the package…
Method 1 Keeps your source control history clean
OR
Method 2 May clutter your source control history
Use the this guide to reinstall.