Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 89864 articles
Browse latest View live

TargetInvocationException when scrolling through Picker options

$
0
0

In my Xamarin.Forms app, some Pickers (with static ItemSources) raise the following error when the user scrolls though the options:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Note this happens when the user is just scrolling through the options (even before they can select anything). The error occurs the moment the user scrolls away from the default value.

Also, this only happens with iOS and not the Android version.

My question is: (1) What could be causing this and (2) how can I go about finding where such errors originate from, especially since it only happens on iOS? The error I get looks like this and isn't very helpful:


How to add checkbox control in XAML

$
0
0

Hi,

I want to add Checkbox control in Xaml page. I added below code in .Xaml page.

    <CheckBox Margin="10, 10, 3, 3" 
                  Name="acceptPolicy" 
                  Content = "Accept our policy"
                  FontSize="12" 
                 Checked="CheckBox_Checked"/>

But i am getting below error?

Error CS0246: The type or namespace name 'CheckBox' could not be found (are you missing a using directive or an assembly reference?)

I am new to Xaml, since i am unable to find Checkbox control in Xamarin.Forms Xaml, i tried to use default Checkbox from here.

If some controls doesn't exist in Xamarin.Forms Xaml, whether can i use default Xaml controls or not?

Maps in Xamarin Forms with .Net Standard 2.0 is possible?

$
0
0

I want to put maps in my Xamarin Forms app but I'm having troubles due to the framework version used. When I try to install Xamarin.Forms.Maps the Visual Studio tells me that is not compatible and is reverting the changes.

There is any way to put maps in Xamarin Forms + .Net Standard 2.0 project? Thanks

Problems to build: error with Microsoft.Build.Framework.ITaskItem ?

$
0
0

Hi all

I work with a project based on “Blank app Xamarin.Forms (Shared)” and am on the way to try ship my app to the shops (what is a pain b.t.w. :smirk:).

By my tries, I abruptly had a new (never seen before) error-message to my iOS-project, was not able to build anymore and have lost almost a day now to fix the problem…
I then have searched the internet for every peace (word) of the error-message and found a Stackoverflow message to Visual Studio (without Xamarin-Tag)

The solution was, to uncheck the checkbox “Activate ClickOnce security settings” on the security-tab to my iOS-project.

I never have changed anything on the security tab explicitly and also don’t see the hang-together with the error-message

Therefore I post the error-messages here, hope this message is found and help someone… :sunglasses:

Example error-message in German:
"app.config;obj\iPhone\Debug\MatrixGuide.iOS.csproj.MatrixGuideiOSapp.exe.config" ist ein ungültiger Wert für den ConfigFile-Parameter der GenerateApplicationManifest-Aufgabe. Es können nicht mehrere Elemente an einen Parameter vom Typ "Microsoft.Build.Framework.ITaskItem" übergeben werden. C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets

Example error-message in English:

C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3243,9): error MSB4094: "app.config;obj\x86\Debug\EnergyMS.csproj.EnergyMS.exe.config" is an invalid value for the "ConfigFile" parameter of the "GenerateApplicationManifest" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".

Embedded Images

$
0
0

So, I add my png file to my upper most project, the one above Android and iOS - I set the image property to Embedded resource. Next, I do the following..

            Image imageBraingLogo = new Image
            {
                HeightRequest = 200,
                Source = ImageSource.FromResource("Thoughtcast.png")
            };

Here's my error message:

[0:] ImageLoaderSourceHandler: Image data was invalid: Xamarin.Forms.StreamImageSource

Any ideas?

Consuming REST service not working-the authentication or decryption has failed. Permissions needed?

$
0
0

Hi Guys,

I'm trying to consume simple GET API service. Unfortunately, the code throws "The authentication or decryption has failed" at var response = await client.GetStringAsync(url);. I guess it might be caused by missing permission. How to grant them/make sure they are granted?

Here's my code:

private async void ReloadUsers()
    {
        using (var client = new HttpClient())
        {
            string url = "https://jsonplaceholder.typicode.com/posts";
            try
            {
                var response = await client.GetStringAsync(url);
                Users = JsonConvert.DeserializeObject<List<User>>(response);
            }
            catch(Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
        }
    }

Could not load assembly 'PresentationFramework' or 'System.Windows.Forms'

$
0
0

When trying to deploy an app on android that depends on a .Net library that used to have references to 'PresentationFramework' and 'System.Windows.Forms', on deployment I receive whether this error:

Severity    Code    Description Project File    Line    Suppression State
Error       Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'PresentationFramework.dll'
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)   NomadApp.Android            

Or the same error but with assembly 'System.Windows.Forms'.

I don't know why it is giving me this errors since none of the libraries I reference, reference none of this two assemblies. I have tried cleaning the solution, cleaning all the projects individually, erasing 'bin' and 'obj' directories for each project, but none of this has worked.

Does someone have any idea on how to work out this? :disappointed:

P.D : I know that these assemblies are not supported by Xamarin.Forms, Xamarin.Android or iOS, that's why I'm trying to remove them, but I still get this error even when I have already removed all the references from the code and from the 'References' in each project! I have even peeked at the .csproj of each project to see if there's some left over reference to one of this assemblies, but I don't see anything. Please help!

After Upgrade to VS 15.6.6: Android-App will not deploy to Android-Emulator or Android-Device

$
0
0

After Upgrade to Visual Studio Version 15.6.6 error-free compiled Android-App does not deploy to the Android-Emulator or Android-Device for debugging. Even in a completely new generated Xamarin-Forms project. An error-message is shown and the following output:

1>C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\apksigner.BAT sign --ks "C:\Users\ackermann\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 15 --max-sdk-version 27 bin\Debug\com.companyname.App1-Signed.apk 1>"apksigner.BAT" wurde mit dem Code 1 beendet.

and then a message like

Xamarin.Android does not support execution of former version. Ensure that build is done for the solution before executing or debugging.

But rebuild doesn't change anything.

Tried out several things like tidying installed Android-Versions and removing Android-P, but just get the same message.

Does anyone have a similar problem or knows a solution?


How to get a full screen app in todays' XF.193, AppCompat environment? (It shouldn't be this hard)

$
0
0

Getting a full screen (no title bar/statusbar/navbar) when your MainActivity is inheriting from FormsApplicationActivity isn't much of a problem.
But then you can't theme it etc.

The current VS solution templates have you inheriting from FormsAppCompatActivity which you can theme. But then the status bar comes back.
It just shouldn't be days of looking at out-of-date how-to pages and mountains of trial and error with countless permutations of these different 'tricks' just to get a full-page app. I have hit every google search, every stack overflow, other questions here with examples that once worked in 2011 and so on. But I can't find or figure out how to make it work today, 2017 on a modern VS solution.

Maybe I've just tried so many different ways I've gotten lost or have multiple different ways conflicting with each other, but can anyone show me how on a basic "Welcome To Xamarin" kind of app how to get it go full screen? I've gotten so close, but not quite there. The best I can do is to have no content in the status bar, but the bar itself is still there. I can' t believe something as common place as wanting a full-screen app is kicking my arse, but it is.

Get rid of the Navigation bar

    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);
            MainPage = new NavigationPage(new RpxOne.MainPage());

        }

MainActivity.cs

Set the theme in the Activity attributes
Set the windows flags
(Clearly lot of various efforts and permutations to get this to work)

    [Activity(Label = "RpxOne",
              Icon = "@drawable/icon",
              Theme = "@style/FullScreen",
              MainLauncher = true,
              ConfigurationChanges = ConfigChanges.ScreenSize |
                                     ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
    {
        WindowManagerFlags _originalFlags;
        protected override void OnCreate(Bundle bundle)
        {
            SupportRequestWindowFeature((int)WindowFeatures.NoTitle);
            //RequestWindowFeature(WindowFeatures.NoTitle);
            //TabLayoutResource = Resource.Layout.Tabbar;
            //ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            //if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            //{
            //    // Kill status bar underlay added by FormsAppCompatActivity
            //    // Must be done before calling FormsAppCompatActivity.OnCreate

            //    this.Window.DecorView.SystemUiVisibility = StatusBarVisibility.Hidden;
            //    ActionBar?.Hide();
            //}
            //else
            //{
            //    this.Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
            //    SupportActionBar?.Hide();
            //}

            //global::Xamarin.Forms.Forms.SetTitleBarVisibility(Xamarin.Forms.AndroidTitleBarVisibility.Never);
            //Window.ClearFlags(WindowManagerFlags.ForceNotFullscreen);
            //Window.ClearFlags(WindowManagerFlags.Fullscreen);
            //Window.AddFlags(WindowManagerFlags.Fullscreen |
            //                WindowManagerFlags.TurnScreenOn |
            //                WindowManagerFlags.KeepScreenOn);

            this.Window.ClearFlags(WindowManagerFlags.Fullscreen);
            this.Window.AddFlags(WindowManagerFlags.Fullscreen); // hide the status bar
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());

        }

And then the theme itself

  <style name="FullScreen" parent="@style/Theme.AppCompat.Light.NoActionBar">
    <!--<item name="windowNoTitle">true</item>-->
    <item name="android:windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <!--<item name="android:windowContentOverlay">@null</item>
    <item name="android:actionBarSize">0dp</item>-->

    <!--<item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">fill_parent</item>

    --><!-- No backgrounds, titles or window float --><!--
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowIsFloating">false</item>


    --><!--<item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>-->
  </style>

Dynamically change system bar color

$
0
0

Hello,

I am trying to change system bar color according to some property of the View that is currently opened so that it matches NavigationBar color. I am changing NavigationBar color in OnAppearing overriden method in view's backing code by setting dynamic resource value:

in App.xaml



...

and in OnAppearing:
Application.Current.Resources["NavigationBarColor"] = selectedColor;

However, there is no way to use this approach for changing system bar color. I got it to work for iOS by adding the following to Info.plist file:

UIStatusBarStyle
UIStatusBarStyleLightContent
UIViewControllerBasedStatusBarAppearance

But no luck for Android part still. The furthest I got is to use CustomRenderer for base page and override OnElementPropertyChanged event in it so that I could monitor if my property of interest is changed and change StatusBar color accordingly:

_window.SetStatusBarColor(((BaseContentPage)Element).StatusBarColor.ToAndroid());

However, if I use back button to go to page that should have different color, the renderer will not be attached to the window (since the page was already present in the Navigation stack) and the color does not get changed.

Please help, I have been banging my head off the wall for days now.

java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.Progres

$
0
0

I am getting regular crash reports logged in hockey app with the following stack trace.

java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx.com.xxxxxxxx.xxxxxxxx/md5b761fe0e06d3cd6f08631c098497f9b1.MainActivity}: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ProgressBar$SavedState
android.app.ActivityThread.performLaunchActivity()ActivityThread.java:2947
android.app.ActivityThread.handleLaunchActivity()ActivityThread.java:3008
at android.app.ActivityThread.-wrap14(ActivityThread.java)
android.app.ActivityThread$H.handleMessage()ActivityThread.java:1650
android.os.Handler.dispatchMessage()Handler.java:102
android.os.Looper.loop()Looper.java:154
android.app.ActivityThread.main()ActivityThread.java:6688
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:1468
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:1358
Caused by: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ProgressBar$SavedState
android.widget.ProgressBar.onRestoreInstanceState()ProgressBar.java:2061
android.view.View.dispatchRestoreInstanceState()View.java:16875
android.view.ViewGroup.dispatchRestoreInstanceState()ViewGroup.java:3476
android.view.View.restoreHierarchyState()View.java:16853
com.android.internal.policy.PhoneWindow.restoreHierarchyState()PhoneWindow.java:2242
android.app.Activity.onRestoreInstanceState()Activity.java:1126
android.app.Activity.performRestoreInstanceState()Activity.java:1081
android.app.Instrumentation.callActivityOnRestoreInstanceState()Instrumentation.java:1182
android.app.ActivityThread.performLaunchActivity()ActivityThread.java:2920
... 9 more

Searching the internet for the exception “java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ProgressBar$SavedState” tells me that I am using duplicate Ids in my android layout files.

My app is a Xamarin.Forms app, so I have no control over android layout files and their Ids.

How can this happen?
Is there something my source code could be doing to create this issue?
Or is this a Xamarin.Forms issue?

HELP PLEASE !!!

debugger will not stop on breakpoints

$
0
0

Hi. I'm new to Xamarin Forms. I'm using Xamarin 5.7 (build 661). The debugger will not stop on any breakpoints for iOS or android.

Even if I manually add a break like this (no luck):
System.Diagnostics.Debugger.Break();

I've tried 'debug iPhone' and also 'debug iPhoneSimulator'.

Any ideas would be appreciated. I must be missing something simple....

Cheers

Play Video in Xamarin Form Cross Platform (PCL using WebView)

$
0
0

Please find here How to Play video in cross Platform in Xamarin forms.

XAML Code : <WebView x:Name="wvPlayer"></WebView>

Code Behind :

private void SelectedItem(object sender, SelectedItemChangedEventArgs es)
    {
        VideoModel lstobj = (VideoModel)es.SelectedItem;

        if (lstobj != null)
        {
            wvPlayer.HeightRequest = (Height / 3);
            wvPlayer.WidthRequest = Width;
            setMargin.Margin = new Thickness(0, (Height / 3) + 15, 0, 0);
            //wvPlayer.Source = lstobj.VideoUrl;

            wvPlayer.Source = new HtmlWebViewSource
            {
                Html = lstobj.VideoUrl.BuildEmbedUrl()
            };
            //ToppalyerControlls.IsVisible = true; // for topplayer control show
        }
    }


public static string BuildEmbedUrl(this string videoSource)
    {
        var iframeURL = string.Format("<iframe src=\"{0}\" frameborder=\"0\" allowfullscreen></iframe>", videoSource);
        return iframeURL.BuildFinalHtml();
    }

    private static string BuildFinalHtml(this string iframe)
    {
        string finalUrl = string.Format("<html><body>{0}</body></html>", iframe);
        return finalUrl;
    }

For Android you need to Add this bellow line in your Android.MainFiest File :

<application android:hardwareAccelerated="true"></application>

NO need to Add anything for IOS.

Xamarin.Android does not support running the previous version while deploying solution- deploy fails

$
0
0

My Xamarin PCL project was working fine since I downloaded Android SDK Platform 27 and updated all NuGet packages.
When try to deploy solution to my device (running Android 7.1) I get this output error:

Build Failed: Xamarin.Android does not support running the previous version. Please ensure your solution builds before running or debugging it.

Build log when debugging this project:
2>Starting deploy Xiaomi Redmi 4A ...
2>Deploying Xiaomi Redmi 4A ...
2>Build started.
2>Project "MobileApp.Android.csproj" (Install target(s)):
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect.apk" "bin\Debug\\com.admir.instantcollect-Signed.apk"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect-arm64-v8a.apk" "bin\Debug\\com.admir.instantcollect-arm64-v8a-Signed.apk"
2>"zipalign.exe" exited with code 1.
2>Done building project "MobileApp.Android.csproj" -- FAILED.
2>Build FAILED.
2>Build started.
2>Project "MobileApp.Android.csproj" (Install target(s)):
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect.apk" "bin\Debug\\com.admir.instantcollect-Signed.apk"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect-arm64-v8a.apk" "bin\Debug\\com.admir.instantcollect-arm64-v8a-Signed.apk"
2>"zipalign.exe" exited with code 1.
2>Done building project "MobileApp.Android.csproj" -- FAILED.
2>Build FAILED.
2> 2>Deploy failed on Xiaomi Redmi 4A ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I have tried to build/clean-rebuild solution and it builds successfully. Here is the build output log:

1>------ Build started: Project: MobileApp.Android, Configuration: Debug Any CPU ------ 1> No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding </assemblyBinding> 1> MobileApp.Android -> C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\bin\Debug\mobileapp.android.dll 1> No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. 1> No way to resolve conflict between "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> Consider app.config remapping of assembly "mscorlib, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Xml, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Core, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.5.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Runtime.Serialization, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "6.0.0.0" [C:\Program Files\IIS\Microsoft Web Deploy V3\Newtonsoft.Json.dll] to Version "11.0.0.0" [C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\packages\Newtonsoft.Json.11.0.2\lib\netstandard2.0\Newtonsoft.Json.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Xml.Linq, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.5.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2245,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding ...</assemblyBinding> ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

  • I have set the Target framework to Android 8.1 latest platform.
  • Target Android version: Use compile using SDK version.
  • Minimum Android version: Android 4.4.

I have tried to change the target platform to 7.1 but the situation gets even worse
I get the same error when using any AVD emulator.
Could anyone explain me why do i get this error, and what can I do to solve it.

Error: Cannot find test-cloud.exe, the path specified by "--uitest-tools-dir" was not found.

$
0
0

I've tried running my UITests on AppCenter Tests for my iOS project, unfortunately I came across problem that can't seem to find anywhere on net.

Error: Cannot find test-cloud.exe, the path specified by "--uitest-tools-dir" was not found.

I give specific path to folder that test-cloud.exe is (file is there), yet I cannot run my tests, because this error gets thrown. I've message microsoft support but they are taking ages to reply. Has anyone come across similar problem?


How to remove the MvxTemplate splashscreen?

$
0
0

I can't for the life of me figure out how to remove the MvxTemplate splash screen with the Xamarin logo from my iOS app. I have set up the assets with launch images and icons (icons show up correctly). Any ideas?

Thanks,

Weird error when I compile : IBTool exited with code 255

$
0
0

Hi,

using Visual studio comunity version 7.4.1, on Macos high sierra 10.13.3
I got on github a sample of RSS reader : https: // github.com/Mahabali/XamarinRSSFeed

when I compile, at first : I can run it.

the IOS project target IOS 10.0
the droid project target latest android 8.1

then, all package needed to be updated.
si I updated all package,
and now, I have 2 errors, which (for me) are not telling me what is wrong :
IBTool exited with code 255
the "IBTool" task failed unexpectedly

I tried to delete all bin and obj, and I tried to clean ll before build, without success.

what can I do ?
except delete visual studio, nuget packages, and reinstall everything ? (this is not an option for me :o)

thanks
Olivier

WebView loaded in background

$
0
0

I have a WebView in a ContentPage that I am instantiating and setting the url to the WebView in the constructor. I am then later showing this ContentPage with PushModalAsync. Thing is, the WebView doesn't seem to be attempting to load until I do the Push. Is there a way to have to preload in the background instead of waiting until it is shown?

Thanks...

Search bar crash on new version of Xamarin with latest XCode

$
0
0

Hi everyone.
Today i updated XCode and Xamarin to deploy to ios 11 device, but app crashes when i open form with SearchBar:

2017-09-20 12:24:14.545 CrossPlatform.iOS[853:301813] *** Assertion failure in -[UISearchBar sizeThatFits:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3694.4.18/UISearchBar.m:1616

When i remove that SearchBar from code program works fine.
This problem appeared only on new version.
I use release versions and Visual Studio for Mac.

SearchBar looks like this:
<SearchBar PlaceholderColor="Gray" BackgroundColor="Transparent" Placeholder="{Binding Search}" FontSize="14" Text="{Binding SearchText}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/>

Picker's name property?

$
0
0

Hi,

I'm creating picker control dynamically on App's initialization. I'm struggling how to give new control a name, so I can later to it somehow. How can I do that?

Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Center,
                    Children = {
                        new Label {
                            HorizontalTextAlignment = TextAlignment.Center,
                            Text = "Wybierz użytkownika i podaj hasło"
                        }, new Picker{
                            HorizontalOptions = LayoutOptions.Center,
                            Title ="Wybierz użytkownika"
                            //Name = "MyPicker" <--not working
                        }, new Entry{
                            HorizontalTextAlignment = TextAlignment.Center,
                            Placeholder = "Hasło"
                        }, b

                    }
                }
Viewing all 89864 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>