Closed Thijmen closed 7 years ago
Perhaps try to uninstall and re-install the nuget. I can't repo.
I saw your project in #37 and went ahead and downloaded it. The only big difference I see is in my Android-project packages.config Yours:
<package id="Xam.Plugins.Settings" version="2.5.1.0" targetFramework="monoandroid71" />
Mine:
<package id="Xam.Plugins.Settings" version="2.5.1.0" targetFramework="monoandroid50" />
When I manually change "monoandroid50" to "monoandroid71", I get errors like "System.TypeLoadException: Could not resolve type with token 010001b8".
Yet, in my Android-project packages.config I have other plugins with "monoandroid71". @jamesmontemagno , could you shed a light on this?
Update After some tweaking with Android-build settings (Compile using Android version, minimum android target etc) I got it working. Thanks for the great package @jamesmontemagno !
That attribute is automatically set based on the version of Android that you are compiling against at the time of package install. This means you are compiling against Android 5.0, which should be fine, however be aware that some projects may be built against newer versions of Android.
@Thijmen What was the solution in your case? The project in #37 works.
Update By cleaning the solution the issue is now resolved
I had the same problem. Apparently I had removed the nuget package from the android project and installed it separately at some later stage. Making the library version in android different from the ones imported at other projects.
Installing the same version got the project and running again finally.
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
1) Delete the 'packages' folder in your root folder (where your NuGet packages are stored locally) 2) Restart Visual Studio
OR
Method 2 May clutter your source control history
Use the this guide to reinstall.
I 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.
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.