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

ERROR WITH LATEST NUGET v2.5.0.77 "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded

$
0
0

I just got latest stable 2.5.0.77107 and I can't compile anymore

[myUser]\packages\xamarin.forms\2.5.0.77107\build\netstandard1.0\Xamarin.Forms.targets(55,3): error MSB4062: The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly [myUser]\.nuget\packages\xamarin.forms\2.5.0.77107\build\netstandard1.0\Xamarin.Forms.Build.Tasks.dll.  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

I replaced my user path with [myUser]

it looks like this bug exists since October in the pre-release:

https://bugzilla.xamarin.com/show_bug.cgi?id=60293


Setting HeightRequest of ListView as sum of all the Item's RowHeight

$
0
0

Hello,
I have ListView which has been put inside the ScrollViewer. ListView renders with fixed height irrespective of number of items in ListView and as ListView is inside ScrollViewer, ListView's Scrollbar doesn't function (it doesn't even show up). So what I want is ListView height should be such that it show up all the items without any scrollbar. My searching on this issue suggests that issue is known issue without any proper fix. I tried various workaround as suggested on different posts however it creates one or another problem at runtime.

Only way to fix this problem seems to be adding up the Row heights of items dynamically upon loading of the list and set the sum of all the item's Rowheight to HeightRequest of ListView. So can anyone suggest proper way of calculating the RowHeight of each item. Pls note that I have uneven rows i.e. each item's rowheight can be different.

Looking forward to pointer/code snippets.

Thanks

I want to build a web view in ios xamarin

$
0
0

I finished the code and i tryed it with www.google.com and it worked but when i tried it with another link and it didn't work . the web page is not an secure website and i think the ios security doesn't let the xamarin te open it .
How can i fix these?

i have problem with creating a custom markup extension

$
0
0

i am trying to learn Xamarin by reading Ceating mobile apps with Xamarin Forms. Page 210 explain how to link Xamarin.FormsBook.Toolkit to CustomExtensionDemo project. I follow instructions(Include a link to the library project in your application solution, and add a reference to that library project in the common PCL project.) but Xamarin studio says FormsBook doesn not exist in the namespace. I have created Markup extension and CustomExtensionDemo project. there is also link in project. new Xamarin.FormsBook.Toolkit.HslColorExtension(); nevertheless it gives error message. i don't know how to reference to that library project in the common PCL project perhaps

VS 2015 Errors on sample projects

$
0
0

Hi there,

Hope someone can help me. I'm checking out the xamarin-form samples on github. On most projects i get the following 2 errors :

Error Build action 'EmbeddedResource' is not supported by one or more of the project's targets.

Error CS0103 The name 'InitializeComponent' does not exist in the current context.

What are these errors and how can i fix them ?

I always open the samples , restore the nuget packages and also update all packages to latest stable version but i still get the above errors.

Thanks again,
Theuns

Hints for 'InflateException' in XF app using an Android AXML for one activity

$
0
0

So I'm working on a Xamarin.Forms app.
While importing an vendor's SDK the make a separate Android Activity that inflates its own UI for a period of time. Kind of like when you click a [camera] button in an app, then another camera view is generated until you take the picture, then goes away returning you to your app.

The vendor sample app works. When importing their elements to my project the same Activity and AXML crashes with an Android Inflate Exception.
Clearly I'm missing some part, reference, or XML style reference. But that exception give no hint, no idea, nothing helpful like "style blahblah could not be found" or "element with @+id/buttonimage" could not be found" etc.

Does anyone know a way to get some more info out of the android side of the app during run-time debugging? This vague message is not helpful at all.

Xamarin Google Auth

$
0
0

I posted the below on StackOverflow with no luck, maybe somebody here can assist.

I am attempting to implement backend server authentication for my App Service in Azure using Google. I used
the guide at causerexception com/2017/12/03/google-native-login-with-xamarin-forms/ to implement authentication in my app. It works until I add in .RequestIdToken(serverClientId or .RequestServerAuthCode.

public GoogleManager()
{
Instance = this;
String serverClientId = "XXXXXXXXXXXXX";
GoogleSignInOptions gso = new
GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn)
.RequestEmail()
.RequestServerAuthCode(serverClientId)
.Build();

    _googleApiClient = new 
 GoogleApiClient.Builder(((MainActivity)Forms.Context).ApplicationContext)
        .AddConnectionCallbacks(this)
        .AddOnConnectionFailedListener(this)
        .AddApi(Auth.GOOGLE_SIGN_IN_API, gso)
        .AddScope(new Scope(Scopes.Profile))                
        .Build();
}

I have verify that my ClientID and ClientSecret are the same in both Azure, GoogleAPIs, and the Xamarin App. The will return GoogleApi will return a status code of 10 when it fails but I can't find any message that associates to that. I believe it has something to do with the ClientId I provided. I have been stuck on this for 4 days now, so any help is greatly appreciated.

THANKS!!

Android: Could not load assembly 'xxx' during startup registration

$
0
0

I'm trying Syncfusion (charts) and in the Android project after deploying I get

Assembly Loader probing location: 'Syncfusion.SfAutocomplete.XForms.Android'.
Could not load assembly 'Syncfusion.SfAutocomplete.XForms.Android' during startup registration.
This might be due to an invalid debug instalation.
A common cause is to 'adb install' the app directly instead of doing from the IDE.

I readded the reference but that didn't help. Furthermore I tried to disable fast deployment without success. How can I find out what the cause is? Building the app works fine.


Xamarin Forms Map - How to know when the map is full loaded and displayed?

$
0
0

Hi,

I really need to know when the map is either full loaded or displayed but I cannot find anything anything about it, why?

Do you have any idea about an event or something like that?

Thank for any help !

Xamarin Forms UWP - MapIcon/Pins size

$
0
0

My question cannot be more easy:

How can I change the size or resize my pins about the zoom?

This is for a CustomPinRenderer of my UWP part. (PCL project)

Scrolling Grid Relative Sizes

$
0
0

I have managed to create a GridView inside a ScrollView that uses 8 rows of row height 250 (Absolute). This was fine until I realised it would not work on screens with different resolutions. How can I create a grid view where there are 8 rows, but each row takes up half the screen so you have to scroll down to see the rest? Using 8 rows of height "*" just puts 8 rows onto the view with no scrolling. I am using xaml but can use c# if necessary.

ios xamarin live player

$
0
0

how to connect my app with a database ?

Can't Compile Release with .NET Native tool chain Error MSB3073 exited with code 1201

$
0
0

I have been developing an App for the windows store UWP Windows 10. In debug mode with "Compile with .NET Native tool chain" turned off.

Now its time to build the release and upload to the store and I get the following compilation error.

1>MSBUILD : error : System.NotSupportedException: Cannot deserialize type 'System.Exception' because it contains property 'HResult' which has no public setter.

1>MSBUILD : error : at System.Xml.Serialization.TypeDesc.CheckSupported()

1>MSBUILD : error : at System.Xml.Serialization.TypeDesc.CheckSupported()

1>MSBUILD : error : at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)

1>MSBUILD : error : at System.Xml.Serialization.ReflectionAwareCodeGen.WriteReflectionInit(TypeScope scope)

1>MSBUILD : error : at System.Xml.Serialization.XmlSerializationWriterCodeGen.GenerateBegin()

1>MSBUILD : error : at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Hashtable assemblies, String outputDir, String assemblyNameBase, IEnumerable 1 referenceDirectories, String intermediateDir, Boolean loadAssembly)

1>MSBUILD : error : ILT0032: Failed to compile serialization code. See the build log for error details.

1>MSBUILD : error : at System.Xml.Serialization.XmlSerializer.GenerateSerializer(Type[] types, XmlMapping[] mappings, CompilerParameters parameters, String outputDir, String assemblyNameBase, IEnumerable 1 referenceDirectories, String intermediateDir, Boolean loadAssembly)

1>MSBUILD : error : at System.Xml.Serialization.XmlSerializer.GenerateSerializer(Type[] types, String outputDir, String assemblyNameBase, IEnumerable 1 referenceDirectories, String intermediateDir, List 1 wcfSerializers, Boolean loadAssembly)

1> Done executing task "RunILTransforms" -- FAILED.

1> Done building target "RunILTransforms" in file "ILTransforms" -- FAILED.

1> Done building project "ILTransforms" -- FAILED.

1>MSBUILD : error : at SerializationAssemblyGenerator.Program.Main(String[] args) C:\Users\user.nuget\packages\microsoft.net.native.compiler\2.0.3\tools\Microsoft.NetNative.targets(741,5): error MSB3073:

The command C:\Users\user.nuget\packages\microsoft.net.native.compiler\2.0.3\tools\x86\ilc\ilc.exe @obj\x86\Release\ilc.MyApp.rsp /v:diag" exited with code 1201.

I am using XML and JSON Serialisation and Deserialisation in my code but it all seems correct.

The issue seems to be with the 'System.Exception' and its property 'HResult' which upon inspection seems to have a protected setter preventing deserialisation.

Any help in solving this would be fantastic.

Entity Framework App Not Launching

$
0
0

I added the binarys for entity framework into the standard master detail application but when I launch my app it just get stucks I have included a screen shot of my program to see if I have referenced everything correctly.

Please let me no if there is something I need to enable to get this working

Picker ItemsSource not binding

$
0
0

I'm attempting to bind a Picker to an ObservableCollection and nothing displays. I have set up a second property, CategoryCount, to return the count of the collection, which correctly shows 2.

    <StackLayout Spacing="20" Padding="15">
        <Label Text="Category" FontSize="Medium" />
        <Picker ItemsSource="{Binding CategoryList}"  ItemDisplayBinding="{Binding Name}" SelectedItem="{Binding Item.Category}" />
        <Label Text="Category Count"/>
        <Label Text="{Binding CategoryCount}"/>
    </StackLayout>


public class ItemDetailViewModel : BaseViewModel
 {
    public ObservableCollection<Category> CategoryList;
    public string CategoryCount
    {
        get
        {
            return CategoryList.Count.ToString();
        }
    }
    public LedgerEntry Item { get; set; }

    public ItemDetailViewModel(LedgerEntry item)
    {
        Item = item;
        CategoryList = new ObservableCollection<Category>()
        {
            new Category(){Id = 1, Name="test"},
            new Category(){Id = 2, Name = "hallo"}
        };
        OnPropertyChanged("CategoryList");
    }
}


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

I've tried changing it to a List of strings with proper values, and could not get that working either. Any thoughts on why I'm having this issue?


How to open navigation Page in Listview local:view ?

$
0
0

<DataTemplate> <StackLayout HorizontalOptions="FillAndExpand" BackgroundColor="White"> <local:NewListView/> </StackLayout> </DataTemplate>
In NewListView.xmal.cs
<Image Grid.Column="13" Source="Reply_UnChecked.png"> <Image.GestureRecognizers> <TapGestureRecognizer Tapped="OnClickReply" NumberOfTapsRequired="1" /> </Image.GestureRecognizers> </Image>
In NewListView.cs
private void OnClickReply(object sender, EventArgs e) { var page = new ReplyPage(); Navigation.PushAsync(page); System.Diagnostics.Debug.WriteLine("Replay Page Open"); }
when i tapped OnClickReply the Debug was showed but the page did not create and open

I already tried await navigation.pushasync but also did not open new page.

I think the local:??? is in listview, so the navigation.pushasync is not work.

How can i create and open the new page when upper case?

Sample for socket application

$
0
0

I need simple sample for socket in Xamarin Forms.

Dynamically changing editor height to accommodate multiple lines of text as needed

$
0
0

I want my editor to behave like the iOS messages app: at first it's just a single line, but as you type enough to add another line, the editor expands and its Y coordinate moves up (so that it doesn't fall offscreen). I read https://forums.xamarin.com/discussion/99124/how-to-show-multiple-lines-in-an-editor and it almost works. The biggest issue I have right now though is that the vertical centering gets screwed up. Here's what happens:
1. Initial startup, editor is sized correctly for a single line
2. Type enough to form a second line. The editor does correctly increase its height, however, now the vertical centering is screwed up. Text is top aligned.
3. Keep typing enough to add a 3rd line. As expected, height correctly changes, but now the text is correctly center aligned vertically
4. Keep typing enough to add a 4th line. Vertical centering screws up as in #2. The pattern keeps repeating: we keep alternating between correctly aligned (center) and top.

Attached are images for states 1, 2, 3 for a more illustrative example.
The code is very simple (as that link shows): the custom editor just simply does InvalidateMeasure when the text changes.

Once I get past that issue, my second issue is that I don't know how to make its Y coordinate adjust upward. In my test I made a grid with 2 rows 1 column (as that link suggested sticking your custom editor in an autosizing grid row). First/top row is a box view which I set a HeightRequest to 500. Second/bottom row is the editor which I didn't set any height values for. In reality the box view will be replaced with a different view, like a list or something, but box seemed easiest to test with. Anyway, the desired behavior is the same as the iOS message app: instead of the text box height expanding downward, the Y coordinate moves up and the height expands, so that the net effect is the box just grows taller (upward) and not downward. I would be OK with either the editor expanding upward and partially obscuring the contents above it, or with the layout adjusting both items so that the height of the upper row shrinks as the height of the lower (editor containing) one expands. Either works just as well.

Add badges Count in the navigation bar using Xamarin Forms

Could not install package 'Xamarin.GooglePlayServices.Base 42.1021.1'

$
0
0

Hi Team,

I have tried to install the NuGet Packages to Xamarin.Forms PCL Project, But the reference is successfully installed in root project but not installed in Android, iOS and etc. I got the following error information. Any solution for this?

Could not install package 'Xamarin.GooglePlayServices.Base 42.1021.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Viewing all 77050 articles
Browse latest View live


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