Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

Cannot Live Run Current View on VS2017 for Android Emulator

$
0
0
My Environment is :
Windows 10 version 1709 Build 16299.98
Visual Studio 2017 Enterprise 15.5.0
Prism Template Pack 2.0.7

I have install "Xamarin Live Player" apk file on my VS for Android Emulator of Marshmallow (6.0.0) XXHDPI and pair with Visual Studio.

When I create a new project : [File] > [New] > [Project] > [Cross-Platform] > [Cross-Platform App] and select Code Sharing Strategy for .NET Standard.

This project can use the "Live Run Current View" and work find on my Emulator.

When I create a new project : [File] > [New] > [Project] > [Prism] > [Prism Blank App]

I select "VS Emulator 5.2-inch Marshmallow (6.0.0) XXHDPI Phone Player (Android 6.0 - API 23)" as target device for building and debugin.

When I build Android Project and no any error.

But when I debug this Android Project of Xamarin.Forms, I get following error message:

![](https://camo.githubusercontent.com/51a643181004df9b3f0d86af0a57615e8309d8b8/68747470733a2f2f636f6e74656e742e73637265656e636173742e636f6d2f75736572732f76756c63616e6c65652f666f6c646572732f536e616769742f6d656469612f64373432366439332d646663632d346163312d623233302d3465663035636131343463652f31322e30352e323031372d31352e34342e706e67)

Rounded corner on TexView (Android)

$
0
0

After focusing on the TextView and start writing, it loses the @ drawable / Rounded_Status propertie

What can be?
As always keep the property?

Crash that only exists when app is downloaded from play store

$
0
0

I have an app that runs perfectly locally on my android device, even when built with the release configuration, but crashes 100% of the time on the load of page when the app is installed from the play store.

The error is:
System.TypeLoadException: Could not resolve type with token 010000a3 (from typeref, class/assembly Xamarin.Forms.Internals.ResourceLoader, Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null)

My question is, is there a way to deploy to my local device and debug the same way that google play has the app built?

How to Set Up Kindle HD for Development?

$
0
0

We just purchased a Kindle HD 8.9. I've downloaded the Kindle SDK and Kindle drivers, and enabled ADB on the kindle but it's not appearing as an option to deploy to in the "Select a Device" dialog in Visual Studio.

Can anyone help guide me through this process so that I can deploy my already existing android app to the Kindle?

Thanks.

How to A/B test using Xamarin forms?

$
0
0

I would like to do A/B test for Android. So i want to display for some users different default page or functionality than other users and I want to observe which one is used more or get uninsalls etc. How is it possible to implement something like that? question is not observing users because I do this already with hockeyapp or azure mobile but how to show page A or page B for different users? Should I upload 2 different apks for that?

How to dispose and recreate a view on the same page?

$
0
0

I have page, I have timer for that i am using Syncfusion sfCircularGauge control. I am doing some action while timer running, once timer complets, i change the view by setting IsVisible=false and other view IsVisible=true, then I reverse the views by showing timer again. my question here is
setting IsVisible=false means is it still in the memory?
If yes, how can I dispose it and recreate the view?
Using C# would make it possible I guess but since I am using MVVM and Xaml. is there a possibility because I am not navigate from the page while all these happening. I am just using Xamarin.Forms.Device.StartTimer in my viewmodel and raising propertychanged on views when timer completes.

The process cannot Access the file because it being used by another process.

$
0
0

I am using Microsoft Visual Studio community 2017 .
I am facing this error every time I try to Create a new Xaml Page:
Error The process cannot access the file 'c:\users\AppData\Local\Temp/gvi232li.ckq\Page.xaml' because it is being used by another process.

Erro 1: error: Error: String types not allowed and application gets all black

$
0
0

Hello.
1. I am getting this message when compiling the project. The error refers to the background image of the button.
2. My project is getting totally black, to go back to normal, I have to go to "Source" and go back to "Design". Most of the time, it's still black.


Copy sqlite db into Android app

$
0
0

Please help. I cannot get my sqlite DB to copy into my Android app. I have done this without issue for a iOS app but the android path seems sooo much harder!

I have the sqlite DB (eng.sqlite) in the root folder of my project. I have tried "Content" build actions (like in the iOS app), AndroidResource, AndroidAsset, EmbeddedResource but I still get "File not found" when i try to copy my DB into the "databases" folder.

I have also tried putting the db in the Assets folder and then tried every build option but still cannot find the file!

string db = "/data/data/SpecDroid.SpecDroid/databases/eng.sqlite";

string rootDbPath = "/data/data/SpecDroid.SpecDroid/eng.sqlite";

//rootDbPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "eng.sqlite"); <-- DIDNT WORK

if(File.Exists(db) == false) {
    Console.WriteLine("Installing DB!");
File.Copy(rootDbPath, db);

}

Any ideas??

All i want to do is copy a previously built sqlite db into the databases folder and then connect to it.

Thanks

Confused by 3D rotations

$
0
0

If I run the Xamarin.Forms 3D rotation sample and compare it to the SkiaSharp 3D rotation sample, I see different behavior. The SkiaSharp transform seems to be relative to the screen, but the Xamarin.Forms transform seems to be relative to the View. In other words, in Xamarin.Forms, if I first rotate the X-axis by 90 degrees, it takes an image and puts it on its side so it looks like a horizontal line. Then if I add a Y-axis rotation, it rotates that line so it spins the line in a circle like hands on a clock. But in SkiaSharp, if I first rotate the X-axis by 90 degrees, it takes an image and puts it on its side so it looks like a horizontal line just like Xamarin.Forms. But now, if I then add Y-axis rotation, it still rotates about the original Y-axis and spins the image so it remains looking like a horizontal line.

Is this working correctly?

Nested grouped ListViews

$
0
0

Hello!

I am making an app and i have to implement a pattern like that

- Group 1
    -Sub Group 1
        -Item 1
        -Item 2
        -Item 3
    -Sub Group 2
        -Item 1
        -Item 2
- Group 2
    -Sub Group 1
        -Item 1
        -Item 2
    -Sub Group 2
        -Item 1
        -Item 2

I've read many posts that suggest that you should not nest ListViews. I understand it but how else should i implement it? This is such a common pattern yet not much is out there when it comes to XF.

I tried creating ListViews with grouping and nest them, but it doesn't really work(maybe it would if i put more effort on it). Does it worth spending my time on fixing my nested grouped listviews, or there is another way for that.

Thanks in advance.

Arrrrghh another update problem

$
0
0

I installed the latest update, now I get the error XamarinShellPackage did not install correctly and my project will no longer load (says it is incompatible). This is with VS2015 Pro also updated to the latest. Any ideas? I tried downgrading to Cycle 8 again and now it won't compile I just get a appt.exe exited with code 1

Xamain App installed in MobileIron - crash will launching

$
0
0

Created an corporate app and first time trying to install in MobilIron, initially not able to install/download. With some changes in entitlement file by deployment team able to install the app now to the iphone. But not able to launch / open the app, it crashes / terminates while launching. Is there is any way to find out the issue ? or How should we fix this issue ? Please advise.

Automatic expandable editor

$
0
0

Basically I want an input field, which expands whenever the user puts too much text in it. There are several approaches out there trying to achieve this. The problem exists in web developement too and it's pretty basic (as seen by an user).

I went with the most logical (well, for me) approach I found. Extend the Changed-event.

private void OnTextChanged_Grow(object inSender, TextChangedEventArgs inEventArgs)
{
      InvalidateMeasure();
}

But this heavily affects the performance! The power needed to invalidate the view each time the user presses a key is just too much.

Is there any other clean way to do it? Maybe even a change to the design / architecture?

Thanks in advance.

ViewCell in ListView can display content has HTML tags

$
0
0

Hi guys,
I have a JSON response get from Api. This JSON return a item array about 200 ~ 1000 items.
Every items is a string which contains HTML tags (that has format: bold text, paragraphs)
I need to display them like as list on Xamarin Forms. I intent to use either ListView or ScrollView + GridView.
Requirements:
- ViewCell need to display completely the content of item, must keep format like as displaying on webview.
- ViewCell can automatically extend height of cell depend on the length of text, and do not display scrollbar.

Could you for me a advice for the solution? If can, please give me a example.
Thanks in advance.


Code Analyzer is flagging Interfaces in Portable library as SecurityCritical

$
0
0

In my project, code analyzer (FxCop) is flagging Interfaces in Portable library as SecurityCritical even though they are not marked as one. Same portable library is consumed by other platform specific implementations, but the same error/warning does not manifest itself there.

Error CA2140 Transparent method 'X' has a local variable 'bindingBuilder' of security critical type 'MyImpl'. In order for this local variable to be allowed under the security transparency rules, either 'X' must become security critical or safe-critical, or 'MyImpl' must become security safe-critical or transparent.

I see a similar thread at http://stackoverflow.com/questions/28280533/what-causes-an-interface-or-assembly-to-become-marked-security-critical where the project is also using Xamarin.

Any ideas why iOS is having these FxCop violations?

(Binding) Interface of [Protocol] does not inherit from NSObject

$
0
0

I was binding a library when I came across an error that IMyProtocol was not found. I researched, asked this question and found the solution, I needed to add

interface IMyProtocol { }

So I did, but now I am running into compiler errors that say IMyProtocol does not inherit from NSObject.

How can I solve this?

The binding code in specific is this:

[Wrap("WeakChannelAuthorizationDelegate")]
IPTPusherChannelAuthorizationDelegate ChannelAuthorizationDelegate { get; set; }

// @property (nonatomic, weak) id<PTPusherChannelAuthorizationDelegate> channelAuthorizationDelegate;
[NullAllowed, Export("channelAuthorizationDelegate", ArgumentSemantic.Weak)]
NSObject WeakChannelAuthorizationDelegate { get; set; }

The generated code is this:

[CompilerGenerated]
public IPTPusherChannelAuthorizationDelegate ChannelAuthorizationDelegate {
    get {
        return WeakChannelAuthorizationDelegate as IPTPusherChannelAuthorizationDelegate;
    }
    set {
        WeakChannelAuthorizationDelegate = value;
    }
}

And here in the setter I receive the compiler error

PusheriOS/PTPusher.g.cs(40,40): Error CS0266: Cannot implicitly convert type Pusher.iOS.IPTPusherChannelAuthorizationDelegate to Foundation.NSObject. An explicit conversion exists (are you missing a cast?) (CS0266) (Pusher)

How can I solve this?

Binding Objective C Lib

$
0
0

I developed an application which wants to bind with Objective c lib (.a file). This application has lots of packages which supports Target framework Xamarin Mac Full. But when I created the binding project it is created as Xamarin Mac Modern. When I changed it to Xamarin Mac Full it shows lots of error, Xamarin.Mac reference is also missing. Please help me on this. How to solve this issue. I am new in Xamarin, so please excuse if anything wrong.

Searching to deploy app on the google store

$
0
0

Hi, I am searching help in deploy my 1st Android app on the google store any pointer document will be great.

Thanks
AB

how to resolve this ???

$
0
0

Severity Code Description Project File Line Source Suppression State
Error MessagingRemoteException: An error occured on client Build42164 while executing a reply for topic xvs/Build/4.2.1.64/execute-task/App2/8333c30%2FDetectSigningIdentity
DirectoryNotFoundException: Directory '/Users/admin/Library/MobileDevice/Provisioning Profiles' not found. App2 Build

I am using virtual mac machine & Visual Studio over Windows OS

Viewing all 204402 articles
Browse latest View live


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