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

Plugin.FirebasePushNotification installation error in Xamarin forms

$
0
0

While installing Plugin.FirebasePushNotification getting error-

Could not install package 'Xamarin.Firebase.Messaging 60.1142.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.0', 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.

after updating Android API 7.0 this installation works well(when create a new project)

BUT i already have a project with compile version Android 6.0.
While installing this plugin on this project then it shows same error.

So how to solve this installation issue on my previous project?


Rectangle Image With Rounded Corners

$
0
0

Hi,
i wanna ask, how to implement this rounded corner card view using xamarin form

i try to use frame with rounded corners and have image inside of it, but when aspect of image is fill, this rounded corner is not showing,

<Frame CornerRadius="20" WidthRequest="200" HeightRequest="100" HorizontalOptions="FillAndExpand" 
                                     VerticalOptions="FillAndExpand" Padding="0" OutlineColor="Maroon">
                                    <Image Source="{Binding ImageUrl}" Aspect="AspectFill" />
    </Frame>

i need the image completely fill the frame, but i need the image have rounded corners
any solution for implement this rounded corner card view?

办理加拿大学历认证,UT毕业,证办理|薇信:744,043,126,办理多伦多大学UT毕业,证学历学位成绩单加拿大文,凭认证

$
0
0

办理加拿大学历认证,UT毕业,证办理|薇信:744,043,126,办理多伦多大学UT毕业,证学历学位成绩单加拿大文,凭认证

办理加拿大学历认证,Western毕业,证办理|薇信:744,043,126,办理西安大略大学Western毕业,证学历学位成绩单加拿大文,凭认证

$
0
0

办理加拿大学历认证,Western毕业,证办理|薇信:744,043,126,办理西安大略大学Western毕业,证学历学位成绩单加拿大文,凭认证

办理加拿大学历认证,Carleton毕业,证办理|薇信:744,043,126,办理卡尔顿大学毕业,证学历学位成绩单加拿大文,凭认证

$
0
0

办理加拿大学历认证,Carleton毕业,证办理|薇信:744,043,126,办理卡尔顿大学毕业,证学历学位成绩单加拿大文,凭认证

办理加拿大学历认证,U of G毕业,证办理|薇信:744,043,126,办理圭尔夫大学U of G毕业,证学历学位成绩单加拿大文,凭认证

$
0
0

办理加拿大学历认证,U of G毕业,证办理|薇信:744,043,126,办理圭尔夫大学U of G毕业,证学历学位成绩单加拿大文,凭认证

办理加拿大学历认证,Windsor毕业,证办理|薇信:744,043,126,办理温莎大学Windsor毕业,证学历学位成绩单加拿大文,凭认证

$
0
0

办理加拿大学历认证,Windsor毕业,证办理|薇信:744,043,126,办理温莎大学Windsor毕业,证学历学位成绩单加拿大文,凭认证

Obfuscate XF Android

$
0
0

How to obfuscate classes with static attributes when generating APK?
We need to hide urls from services and keys.


NUnit vs xNUnit

$
0
0

I am writing unit test for my PCL project, and come with 2 options xUnit and NUnit. So , would like know should I go with xUnit or NUnit?

Cheers,
CT

csproj error when adding a NuGet package

$
0
0

Hello, I got " Dependent project Shift.csproj failed to build, using old version" when I add any Nuget Package to my project, i tried with 3 different packages and I got the same error.

For example, when I put "using SQLite;" on a .cs file it gives me the csproj error when I try to run and if I erase the sentence "using SQLite;" it runs correctly.

I dont have any Build fail. The error only appears when I try to run the app.

Regards!

Xamarin Android - fresh app created - infinite build and deploy issue (Windows 10 & MacOS Sierra

$
0
0

Today, I am trying to understand what is the problems with my project since the update to .NET Core 2.0. I am working with Xamarin since 2015 and after so long, even if the technology is so great to me, I still have so many issues with the release mod.. (build, deployment, store, etc)

Today I was like "Ok it's Saturday so let's take some time to understand where these problems could come from." So I just created a project, this is my configuration:

Operating System Configuration

Edition Windows 10 Education
Version 1709
OS Build 16299.125


Visual Studio

Microsoft Visual Studio Community 2017
Version 15.5.2


.NET Framework

Microsoft.NET.Framework
Version 4.7.02556

I just created the project and the build is infinite.... x) What did I do?

Well step by step, I did that:

  • File -> New... -> Project...
  • Installed -> Visual C# -> Cross-Platform -> Cross-Platform App (Xamarin.Forms)
  • I then name it "NightLine"
  • I don't change anything and try to build (any CPU)

Since I also have a MacBook Pro, I tried with it :) I copied the whole solution and run the .sln from my Mac.

Operating System Configuration

macOS Sierra
Version 10.12.6


Visual Studio

Visual Studio 2017
for Mac [Community]
Version 7.3.2

  • Debug/Build -> OK
  • Debug/Deploy -> Ok
  • Release/Build -> Ok
  • Release/Deploy -> KO

    EXEC : warning : Directory obj/Release/android/assets contains Java.Interop.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Mono.Security.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains System.Core.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains System.Net.Http.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains System.Runtime.Serialization.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains System.ServiceModel.Internals.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains System.Xml.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains System.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Animated.Vector.Drawable.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Annotations.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Compat.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Core.UI.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Core.Utils.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Design.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Fragment.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Media.Compat.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Transition.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.Vector.Drawable.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.v4.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.v7.AppCompat.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.v7.CardView.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.v7.MediaRouter.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.v7.Palette.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Android.Support.v7.RecyclerView.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains Xamarin.Forms.Platform.dll but no debug symbols file was found.
    EXEC : warning : Directory obj/Release/android/assets contains mscorlib.dll but no debug symbols file was found.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2424,2): warning : No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2047-12-14) or after any future revocation date.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(514,2): error : Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
        27 Warning(s)
        1 Error(s)
    
    Time Elapsed 00:00:06.19
    

Another thing which is weird, in another console, the Application Output one, on MacOS, I have the following message, but I am not sure if it has any link:

    > am start -n "eip.NightLine/md5fc7575fc7d4ab373cd3cbb2310170cc6.MainActivity"
    > Starting: Intent { cmp=eip.NightLine/md5fc7575fc7d4ab373cd3cbb2310170cc6.MainActivity }
    Error type 3
    Error: Activity class {eip.NightLine/md5fc7575fc7d4ab373cd3cbb2310170cc6.MainActivity} does not exist.


     Failed to launch app: Device could not find component named: eip.NightLine/md5fc7575fc7d4ab373cd3cbb2310170cc6.MainActivity

Otherwise, I have everything installed, I mean in the SDK Android. I installed every elements...

Do you have any idea why it acts like that with android?

Error CS1503: Argument 3: cannot convert from 'System.Collections.Generic.List>' to 'int'

$
0
0

Bellow is my simple android program for adding names on the list.
The error is at the line : ArrayAdapter adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, mItems);

using Android.App;
using Android.Widget;
using Android.OS;
using System;
using System.Collections.Generic;

namespace ListViewTutorial
{
[Activity(Label = "ListViewTutorial", MainLauncher = true)]
public class MainActivity : Activity
{
// int count = 1;
private List mItems;
private ListView mlistView;

    protected override void OnCreate(Bundle bundle)
    {
        base.OnCreate(bundle);

        // Set our view from the "main" layout resource
        SetContentView(Resource.Layout.Main);
        mlistView=FindViewById<ListView>(Resource.Id.mylistView);

        mItems = new List<string>();
        mItems.Add("bob");
        mItems.Add("Tom");
        mItems.Add("Jim");

        ArrayAdapter<string> adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mItems);

        mlistView.Adapter = adapter;
    }
}

}

any help?

Unable to upgrade XF to 2.5.0.121934 only for .Droid project

$
0
0

On Sunday I tried to upgrade XF to the latest version 2.5.0.121934 in an old PCL solution for all the projects. The PCL & iOS projects got the new version but the .Droid is having issues. The errors that I got at various times are quite different. Log of what I did was as follows:

After upgrading from 2.4.x.xxx to 2.5.0.121934:

Adding package 'Xamarin.Android.Support.Compat.25.4.0.2' to folder 'C:\XPA\My_App\packages'
Added package 'Xamarin.Android.Support.Compat.25.4.0.2' to folder 'C:\XPA\My_App\packages'
Added package 'Xamarin.Android.Support.Compat.25.4.0.2' to 'packages.config'
Successfully installed 'Xamarin.Android.Support.Compat 25.4.0.2' to My_App.Droid
Adding package 'Xamarin.Android.Support.Core.UI.25.4.0.2' to folder 'C:\XPA\My_App\packages'
Added package 'Xamarin.Android.Support.Core.UI.25.4.0.2' to folder 'C:\XPA\My_App\packages'
Install failed. Rolling back...
Package 'Xamarin.Android.Support.Core.UI.25.4.0.2 : Xamarin.Android.Support.Compat [25.4.0.2, 25.4.0.2]' does not exist in project 'My_App.Droid'
Removed package 'Xamarin.Android.Support.Compat.25.4.0.2 : Xamarin.Android.Support.Annotations [25.4.0.2, 25.4.0.2]' from 'packages.config'

Then I downgraded to 2.5.0.91635:

Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ....\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets. My_App.Droid C:\XPA\My_App\My_App\My_App.Droid\My_App.Droid.csproj 341

Then after I deleted all the entries in 'packages' folder:

Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ....\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props. My_App.Droid C:\XPA\My_App\My_App\My_App.Droid\My_App.Droid.csproj 377

Then I upgraded to 2.5.0.121934 again:
(Now .Droid is in 2.5.0.91635 and the PCL & iOS projects are in build 121934)

Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ....\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props. My_App.Droid C:\XPA\My_App\My_App\My_App.Droid\My_App.Droid.csproj 377

When I just build the .Droid project, ignoring above error:

Severity Code Description Project File Line Suppression State
Error Xamarin.Forms targets have been imported multiple times. Please check your project file and remove the duplicate import(s). My_App.Droid

My .Droid.csproj file has got these entries:

  <Import Project="..\..\packages\Xamarin.Forms.2.5.0.91635\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\packages\Xamarin.Forms.2.5.0.91635\build\netstandard1.0\Xamarin.Forms.props')" />
  <Import Project="..\..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props" Condition="Exists('..\..\packages\Xamarin.Forms.2.5.0.121934\build\netstandard1.0\Xamarin.Forms.props')" />

Why the 'netstandard1.0' are referenced when my project is an old PCL one? Now my .Droid project doesn't build. This is a working app. How do I cleanup all this mess?

ListView in StackLayout

$
0
0

Hey @all,
I have some troubles with the scrolling functionality of a ListView in a StackLayout in the special case of adding the ListView not as first element in the StackLayout.
For example if I add the ListView as first child in the StackLayout I can scroll through all of my children in the ItemSource but if I add a label for example on the first place the ListView is fixed and the scrolling function of the ListView is obvious disabled.
Thank you for any hint or advise!

Working Code:

    StackLayout setup = new StackLayout();
            setup.Padding = new Thickness(20, 20, 20, 20);
            setup.BackgroundColor = Color.AntiqueWhite;

            //setup.Children.Add(CreateCountryView());

            _setupView = new ListView()
            {

                ItemsSource = _setup.Setup.Skip(1),
                RowHeight = 40,
                ItemTemplate = new DataTemplate(() =>
                {
                    return new SetupEntryCell(_setup);
                }

                ),
                VerticalOptions = LayoutOptions.CenterAndExpand,


            };

            setup.Children.Add(_setupView);

Not working Code:

StackLayout setup = new StackLayout();
            setup.Padding = new Thickness(20, 20, 20, 20);
            setup.BackgroundColor = Color.AntiqueWhite;

            setup.Children.Add(CreateCountryView());

            _setupView = new ListView()
            {

                ItemsSource = _setup.Setup.Skip(1),
                RowHeight = 40,
                ItemTemplate = new DataTemplate(() =>
                {
                    return new SetupEntryCell(_setup);
                }

                ),
                VerticalOptions = LayoutOptions.CenterAndExpand,


            };

            setup.Children.Add(_setupView);

Why does master-detail Navigation page icon image display in grayscale only?

$
0
0

Have a Xamarin-Forms Master Detail app. using an image for the icon for hamburger menu. Even though the image is white in color, no matter what I try, it displays in grayscale. The Smart360 Hotel sample app demoed at Connect displays the images in white color. Tried to use the UINavigationBar.Appearence settings from the demo app but still no luck.

Any help highly appreciated.


facebook Login with Xamarin.Forms: You are not logged in. Please log in and try again.

$
0
0

Hi All, I am implementing Facebook Login in Xamarin.Forms. I am using Xamarin.Auth to achieve this. Everything is set up but I am getting this error when app launches. Find below screenshots for error and My facebook App settings. Help please.





Creating a new Shared Project with Visual Studio 15.6 Preview 1.1 2017

$
0
0

IDE: Visual Studio 15.6 Preview 1.1 2017
Project: Cross-platform App (Xamarin.Forms) | Blank App
Platforms: Android, iOS, UWP
UI Technology: Xamarin.Forms
Code sharing: Shared Project

When I try to create this project I get the follow error:

The expression "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathTOStandardLibraries(MonoAndroid, "v8.0", '','','')" cannot be evaluated. Input string was not in a correct format. C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets

Any help would be greatly appreciated, thank you!

Prism Template

$
0
0

Hi all,
i create a new application with the Template from Prism (Prism Blank App (Xamarin.Forms).
Now when running the UWP App in Debug Mode all Breakpoints ignored. Running the Android Version in the Emulator the debugger works as expected.

Thanks in advance
Peter

Xamarin.Forms (android) using Camera2

$
0
0

Does anyone know how to get the Camera2 API to work in Xamarin.Forms? I can't find any tutorials (Android or Xamarin) to use the API outside of a fragment which is not supported in Forms.

Any help would be appreciated- Thanks!

Push notifications (FCM) ideas?

$
0
0
Hi!
I have been assigned a task. Implement push notifications in a Forms project, coming from Firebase.

I only find examples for xamarin.android. is it possible to do it in xamarin.forms?

If so, any idea? I am pretty new to this.

Is there a better way rather than using firebase? Thanks!
Viewing all 58056 articles
Browse latest View live


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