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

Kindly Help: Error: AnalyticsListenerImplementor is not abstract and does not override abstract meth

$
0
0

Hi,

My app started throwing this error in my PCL's Android applocation

Error: error: AnalyticsListenerImplementor is not abstract and does not override abstract method onRenderedFirstFrame(EventTime,Surface) in AnalyticsListener
public class AnalyticsListenerImplementor

What could be the reason for this please?

Thanks,
Jassim


Xamarin Forums & FSharp.core conflicts (warnings/errors from auto compile-time version downgrade)

$
0
0

RE: Xamarin Forums & FSharp.core conflicts (warnings/errors from auto compile-time version downgrade)

I just have a simple solution for a Blank Xamarin Forms app (with F#)

I import FSharp.Core as a nuget package and it's immediately downgraded to FSharp 4.3.4. The current version is 4.5.2 and this is the version used in our other modules. Successive tries to "update" it do nothing. I can't find any hardcoded references to include this version - 4.3.4 F# anywhere. Please help. This is causing a conflict with other modules in our app. I'm just noting this as an error in the Blank app because it is simple to re-produce for anybody.

I'm on a mac with latest OSX, FWIW.

Thanks.

PS. Warning/Error messages below -->
Warning NU1605: Detected package downgrade: FSharp.Core from 4.5.2 to 4.3.4. Reference the package directly from the project to select a different version.
Warning MSB3277: Found conflicts between different versions of "FSharp.Core" that could not be resolved. These reference conflicts are listed in the Error FS0193: The module/namespace 'Microsoft.FSharp.Core' from compilation unit 'FSharp.Core' did not contain the namespace, module or type 'voption`1' (FS0193)

Can't deploy to iOS device

$
0
0

I don't seem to be able to deploy my app to my development device, but i can deploy it to the simulator.
When I try to deploy on the phone it builds fine, and it looks like it's trying to deploy it (I see the orange bar in Visual Studio), but the I get this error:

The app has been terminated.
Launch failed. The app 'VeloGuideApp.iOS' could not be launched on 'Cristian's iPod touch'. Error: error MT1006: Could not install the application '/Users/stesvis/Library/Caches/Xamarin/mtbs/builds/VeloGuideApp.iOS/6ee0c78da6bf8cf1ef3337469310aca5/bin/iPhone/Debug/VeloGuideApp.iOS.app' on the device 'Cristian's iPod touch': AMDeviceSecureInstallApplicationBundle returned: 0xe8000087 (kAMDIncorrectArchitectureError).
. Please check the logs for more details.
The app has been terminated.

What's wrong? All the packages (including Xamarin Forms) are up to date.

Thanks!

Are there any new Xamarin books planned by MS?

Toolbox problem in Visual Studio 2017 for xamarin

$
0
0

On xamarin forms app xaml did not support toolbox controller. All xaml controller are shown but are disabled. i tried to reset, reinstalled but nothing happened. Does xamarin forms support toolbox controller? plz, help me if anyone faced this problem and has got the solutions.

Slider color question - Android looks different

$
0
0

I am utilizing the Slider control in Xamarin forms. The slider functions fine and looks correct in Ios but Android it appears the bar is greyed out and is difficult to see for users. Below is my xaml and a screenshot of the issue.

     <StackLayout Margin="10" Spacing="0" Orientation="Horizontal" Padding="0" VerticalOptions="Center" HorizontalOptions="FillAndExpand" BackgroundColor="#9dc2e0">
                <Slider MaximumTrackColor="White" MinimumTrackColor="White"   ThumbImage="car.png" Margin="0,0,5,0" HeightRequest="10"   x:Name="mileSlider" ValueChanged="SliderValueChanged"  Maximum="100" Minimum="10"  HorizontalOptions="FillAndExpand"></Slider>

       </StackLayout>

Here is how it looks in Android

Xamarin.Forms.WebView not showing

$
0
0

Right,

So declaring a web view like this -

WebView browser = new WebView
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand
            };

and then doing Content = browser; shows the web view just fine, But putting it in a StackLayout like this

StackLayout test = new StackLayout ();
            test.Children.Add (browser); 
            Content = browser;

and it won't show!! and I've tried putting fill and expand options on the StackLayout and it doesn't work either. I've tried with a Grid with no luck too. This is iOS and I have the NSTransportSecurity stuff in plist, The web view shows just doesn't show in a view for some reason....

Thanks

How to place an ActionSheet on iPad?

$
0
0

Hey Guys,

i am trying to show an ActionSheet in the lower right corner (iPad). But i cannot find any placing options. It seems that the ActionSheet is only showing correct on an iPhone, but not on an iPad. Do i miss something?

        var sheetConfig = new ActionSheetConfig();

        if (picker.IsCameraAvailable)
            sheetConfig.Add("Kamera", () => this.FromCamera.Execute(null));
        if (picker.IsPhotoGalleryAvailable)
            sheetConfig.Add("Galerie", () => this.FromGallery.Execute(null));

        dialogs.ActionSheet(sheetConfig);

Would be nice, if someone could give me a hint.

Thanx in advance.
Chris


Airwatch SDK with Xamarin Forms

$
0
0

I'm trying to setup the airwatch SDK from this link: components.xamarin.com/gettingstarted/awsdk for use with Xamarin forms. The link has instructions for setting it up for android and IOs. Is it compatible with Xamarin.Forms? Does anyone have any examples with it working with forms?

Thanks,

CopyWin32Resources failed with exit code -1

$
0
0

I keep getting the error : CopyWin32Resources failed with exit code -1
every time I make a new XarmarinForms project and build my UWP app. At first I was just updating the Xamarin.Forms nuget and the Microsoft.NetCore.UniversalWindowsPlatform nuget and that was doing just fine. However, today I keep getting this error even after updating all my nuget packeges. It believe it occurs in the Microsoft.NetCore.UniversalWindowsPlatform nuget package according the the following build logs:

1>------ Build started: Project: WindowsFluentDesignSample.UWP, Configuration: Debug x86 ------
1>  WindowsFluentDesignSample.UWP -> C:\Users\adham\Source\Repos\WindowsFluentDesignSample\WindowsFluentDesignSample\WindowsFluentDesignSample.UWP\bin\x86\Debug\WindowsFluentDesignSample.UWP.exe
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3093,5): warning : APPX4001: Build property AppxBundlePlatforms is not explicitly set and is calculated based on currently building architecture. Use 'Create App Package' wizard or edit project file to set it.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(2487,5): warning APPX0104: Certificate file 'WindowsFluentDesignSample.UWP_TemporaryKey.pfx' not found.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(2487,5): warning APPX0107: The certificate specified is not valid for signing. For more information about valid certificates, see http://go.microsoft.com/fwlink/?LinkID=241478.
1>C:\Users\adham\.nuget\packages\microsoft.net.uwpcoreruntimesdk\2.1.2\tools\CoreRuntime\Microsoft.Net.CoreRuntime.targets(238,5): error : CopyWin32Resources failed with exit code -1
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

When I double click 1>C:\Users\adham\.nuget\packages\microsoft.net.uwpcoreruntimesdk\2.1.2\tools\CoreRuntime\Microsoft.Net.CoreRuntime.targets(238,5) it takes me to Microsoft.Net.CoreRuntime.targets where I also believe that the error is happieing in the Line 238 (Build logs) which is

<WireUpCoreRuntime
        AppxManifest="@(FinalAppxManifest)"
        AppxPackagePayload="@(AppxPackagePayload)"
        OutputPath="$(_WireUpCoreRuntimeOutputPath.TrimEnd('\'))"
        TargetRuntime="$(TargetRuntime)"
        TargetArch="$(_PlatformTargetForCoreRuntime)"
        FrameworkPackages="@(FrameworkPackagesForTargetArchitecture)"
        CoreRuntimeSDKLocation="$(CoreRuntimeSDKLocation)"
        CopyWin32ResourcesLocation="$(CopyWin32ResourcesX86Path)">

This prevents me from doing any projects so I need quick help

Google ANR Analyzer for Xamarin apps

$
0
0

Hi,

As you know that the current Google ANT=R available on Google Play Console is as of no use when developing Xamarin apps because it doesn't tell where is the issue, which page and what control?

I also tried Firebase but it's the same and Microsoft App Center don't have this feature yet as confirmed by the team.

Is there any good analyzer to use with Xamarin to identify the ANR issue?

Thanks,
Jassim

VM Server requirement

$
0
0

What is the server requirement in order to host the mobile apps created using Xamarin?

Xamarin Camera

$
0
0

Hi, i wanna show the camera on xaml file, for example in stacklayout, but i can´t find an example. The only examples are about how to display de camera device.

VS2015 stops debugger after iOS app is launched

$
0
0

I'm seeing this error at random times. When it starts happening, it happens consistently unless I restart VS. The issue is that when the app is launched, debugger stops with a message in the console:

Launching 'AppXiOS' on 'xyz's iPhone'...
Launched 'AppXiOS' successfully on 'xyz's iPhone'...
The app has been terminated.

iOS device keeps running the app, but VS has no connection to it anymore.

Build FFmpeg for Android

$
0
0

I have seen posts all over the internet about how to build an Android version of FFmpeg. I have tried the scripts that were proposed. It appears nothing works. Does anyone know of an point by point instruction set they have experience with that works on Ubuntu. I have downloaded the NDK too.


Adjust Width of Master on MasterDetailPage

$
0
0

I am using the MasterDetailPage for the NavigationDrawer on Android. Implementing the functionality has gone perfectly, however the width is too large and i would like to adjust it.

I have tried to set the WidthRequest for the ListView CellTemplate, ListView, and the Master Property of the MasterDetailPage all to the same value, and i can see that the cells are at the right width but the slide out part is still too big.

public MainPage(Action loginFaliedCallback) { MenuPage menu = new MenuPage { Title = "Menu", WidthRequest = 250 }; menu.Menu.ItemSelected += (s, e) => NavigateTo(e.SelectedItem as MenuItem); Master = menu; Master.WidthRequest = 250; }
Any information would be greatly appreciated. Thanks in advance.

Xamarin Forms MVVM parent / child example?

$
0
0

Is there a parent / child example out there somewhere? I’ve not seen one out there.

To be clear, I am not referring to a MasterDetailPage.

I am using Visual Studio 2017 Mac with a netstandard2.0 Xamarin Forms iOS / Android project solution. I’ve added sqlite-net-pcl version 1.4.118 NuGet; using XF version 3.1.0.x. I tried using the sqlite-net Extensions, but that crashes when I try to use OneToMany / ManyToOne.

Two models: a Player and Team (see below).

There can be many Players. A team can have 1 to many Players on it.

There are plenty of examples how to deal with the MVVM child (Player), so no examples need for that. I wanted a ContentPage that would allow the user to enter a new Team (name) at the top and a ListView / Grid of Players for that team via a Switch or Checkbox listed below the team name.

Models:
namespace Project.Models
 {

[Table(“Player”)]

public class Player

{

[PrimaryKey, AutoIncrement]

public int Id { get; set; }
public string Name { get; set; }

public string Position { get; set; }

}

}

namespace Project.Models
 {

 [Table(“Team”)]

public class Team

{

 [PrimaryKey, AutoIncrement]

public int Id { get; set; }

 public string Name { get; set; }

 public List Players { get; set; }

}

}

Note: the List Players will generate a runtime error. Note: I did think of a way to stuff the int list into a string and get it back out as a int list; however, I thought it important to get the concept across rather than it correctly working but a muddled.

That said, I’d think that this should be a (relatively speaking) common design pattern and I’d like to see an MVVM example of how to do this. I’ve searched the forum, but didn’t see any non-native XF example. I’ve also done a Bing search and didn’t find it an example there either.

Can anyone point me to some good links?

Native crash on Android tgkill

$
0
0

Hi Guys,

I have an Android app built on Xamarin Form Cross Platform. It is working fine except it has crash some time which I can't figure it out.
This is what I can find from Play Console.

backtrace:
#00 pc 000000000004acf4 /system/lib/libc.so (tgkill+12)
#01 pc 0000000000048493 /system/lib/libc.so (pthread_kill+34)
#02 pc 000000000001d5c1 /system/lib/libc.so (raise+10)
#03 pc 00000000000190a1 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 0000000000017104 /system/lib/libc.so (abort+4)
#05 pc 000000000029cc6c /data/app/com.topbookkeeper.topbk-2/lib/arm/libmonosgen-2.0.so

Appreciate if anyone can give an idea.

Thanks
Sid

Error the item X was specified more than once in the source folder

$
0
0
I have a Xamarin.Forms project and I drag and drop an image to my Android resources folder, then I copied it and pasted it in my UWP Project, but the image doesnt display, so I changed its build action to Content, but it displays the error:

Error The item "obj\Debug\MainPage.xaml.g.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter. XamaTask.Android
Im not sure if its related with the images, but after I duplicated,renamed and changed that build action property the error started to show , I also deleted the images and renamed more times again and checked my Android.csproject but I dont find any duplicated item.
Edit
I have found the file that have the error, but Again, I dont find any duplicated, here it is the code:


//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------

[assembly: global::Xamarin.Forms.Xaml.XamlResourceIdAttribute("XamaTask.Droid.MainPage.xaml", "MainPage.xaml", typeof(global::XamaTask.MainPage))]

namespace XamaTask {


[global::Xamarin.Forms.Xaml.XamlFilePathAttribute("C:\\Users\\M\\source\\repos\\XamaTask\\XamaTask\\XamaTask\\MainPage.xaml")]
public partial class MainPage : global::Xamarin.Forms.ContentPage {

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "2.0.0.0")]
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(MainPage));
}
}
}

How to add json layer in a button click in xamarin forms?

$
0
0

I am new in xamarin forms I want to add a json layer in a button click in my map.How can I do this.I am tried with a dependency for adding json layer.I using using Xamarin.Forms.GoogleMaps for creating map.

Please help me...

Here is my code

private void Close_Tapped(object sender, EventArgs e)
  {
    try
    {
        var _IIGeoJsonLayer = DependencyService.Get<IGeoJsonLayer>();
        _IIGeoJsonLayer.AddLayerJson();
    }
    catch (Exception ex)
    {

    }
  }

Here is my Dependency Service

 public void AddLayerJson()
   {
    GoogleMap gmap =null;
    GeoJsonLayer layer = new GeoJsonLayer(gmap, Resource.Raw.jsonFile, Android.App.Application.Context);
    layer.AddLayerToMap();
  }
Viewing all 77050 articles
Browse latest View live


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