xamarin.android

Can't import existing keystore to Visual Studio 2017

被刻印的时光 ゝ 提交于 2019-12-12 11:57:20
问题 I am having trouble importing an existing keystore to Visual Studio 2017 (15.7.2) in order to sign my Xamarin.Android application. I switched machines, so I had to do a fresh VS installation. I have successfully created an archive, but I can't get my old keystore imported into VS. No matter what I try, I get the same cryptic error. I can sign the APK manually with the keytool, so it's not about a wrong password. 回答1: From this path in your old machine Copy the folder Keystore in the same path

azure mobile service not working on xamarin.android

对着背影说爱祢 提交于 2019-12-12 11:35:32
问题 I'm trying to implement Azure Mobile Services in my Xamarin.Forms app. I'm following this link and it works on iOS but not on Android. It throws this exception: MobileServiceInvalidOperationException - "The server did not provide a response with the expected content." I have tried switching between HTTP and HTTPS but could not get it working. It works on Android (native) as well, just not on Xamarin.Android Any help? 回答1: Your issue is tracked here, and seems to be because of the following:

Passing references to Activity Intent

孤街醉人 提交于 2019-12-12 11:19:43
问题 For quite some time I've had troubles passing variables from one Activity to another, and I've usually had to resolve to some pretty ugly Static-class-hacks to make it work. Generally something along the lines of a static method that I call with the type of the Activity, along with the variables the Activity requires. These gets stored in a static variable, and retrieved in the constructor of said activity. Like I said, pretty ugly. And there's no such thing as "myActivity.StartActivity(new

Mono Droid onClick event not found

安稳与你 提交于 2019-12-12 11:10:08
问题 I have the following layout: <Button android:id="@+id/MyButton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Hello" android:clickable="true" android:onClick="Foo" /> And this in my Activity: [Activity(Label = "LayoutTest", MainLauncher = true, Icon = "@drawable/icon")] public class Activity1 : Activity { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); } public void Foo(View v) {

CS0117 C# 'Resource.Id' does not contain a definition for “PhoneNumberText”

狂风中的少年 提交于 2019-12-12 10:52:48
问题 I use Visual Studio 2015 with Xamarin. I'm naming my project "Phoneword" I see this code such as tutorial/example on Xamarin's site. The same error for TranslateButton and CallButton members. MainActivity.cs using System; using Android.App; using Android.Content; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; namespace Phoneword { [Activity(Label = "Phoneword", MainLauncher = true)] public class MainActivity : Activity { protected override void OnCreate

How to make Apk of Xamarin Application to Run on Android Device

旧城冷巷雨未停 提交于 2019-12-12 09:22:39
问题 I am new to Xamarin Mobile App Development.I have developed a basic mobile app but I am having an issue with creating the .apk to test it on my Samsung Galaxy S-5 Android phone.I searched few ways from google but None of them worked. Kindly suggest some simple solution for this, also I want to run the app on windows phone too if there is any way for that as well?. Any help would be grateful. 回答1: For Generating an APK file you need to perform the following steps in Visual Studio 15: 1.In your

Error even after installing android v4 support library in Xamarin

霸气de小男生 提交于 2019-12-12 07:19:04
问题 Even after installing v4 support library from Xamarin Component Store,I get this error.I tried googling for these problems but I always get the same error in Xamarin Studio while developing android app 回答1: This is Xamarin Bug 32498 The problem starts when you are normally installing one of Xamarin.Android.Support.* nuget packages. Then IDE (VS2015 for me) hangs and nothing goes well, so you're forced to shutdown the IDE. After re-openning the IDE and forcing a link to the assemblies and when

App running in Android Emulator fails to perform an HTTP Post to localhost

拥有回忆 提交于 2019-12-12 06:56:32
问题 I'm unable to perform an HTTP Post with an app running in an Android Emulator . {StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.HttpConnection+HttpConnectionResponseContent, Headers: { Server: Microsoft-HTTPAPI/2.0 Date: Wed, 23 Oct 2019 00:58:01 GMT Connection: close Forwarded: host=XXX.XXX.X.XX:XXXXX; proto=https Content-Type: text/html; charset=us-ascii Content-Length: 374 }} Setup: I'm using an IP address generated by Conveyor by Keyoti I installed a

Android DataBinding - How to Bind A ViewGroup's Properties

久未见 提交于 2019-12-12 06:50:48
问题 I am developing an Android app in Xamarin.Android(C#). However, i do feel that this question can also be answered by any Java devs as well. I am new in android development. Anyways, i created a fragment with just a LinearLayout and a TextView inside it. When i create the background class for it, i don't inherit(on in JAVA's word, extend ) it from the Fragment class but rather from the LinearLayout class. So, the MyFragment.cs file starts like this : public class MyFragment : LinearLayout The

How can I enable NTLM and TLS 1.2 with Xamarin on Android?

会有一股神秘感。 提交于 2019-12-12 06:25:42
问题 I am working with a client app in Xamarin on Android and I need TLS 1.2 and NTLM. So far, I have been using the regular System.Net.HttpClientHandler and it has worked fine - it looks like this: new System.Net.Http.HttpClientHandler() { Credentials = credentials }; But now I have a new customer and I need TLS 1.2. So I made this code for Android: new Xamarin.Android.Net.AndroidClientHandler() { Credentials = credentials }; With the environment variable: XA_HTTP_CLIENT_HANDLER_TYPE=Xamarin