xamarin.android

Android app crashes instantly with “Didn't find class {hash}.MainApplication” [duplicate]

余生颓废 提交于 2019-12-12 19:29:21
问题 This question already has answers here : Do I know if I need Multi-Dex enabled? (ClassNotFoundException) (2 answers) Closed last year . I've upgraded my Windows to 10.0.16299 (latest) and my Visual Studio to 15.5.1 (latest). Since then, when I build and run my Android app built in my Xamarin the app crashes instantly. Unfortunately, [AppName] has stopped. The issue appears no matter whether I want to run the app on an emulator or a connected real device. The output window shows this error

Xamarin build error: defining a default interface method requires --min-sdk-version >= 24

对着背影说爱祢 提交于 2019-12-12 19:22:09
问题 After installing Plugin.MediaManager 0.7.1 in my Xamarin Forms project, the Android build gives me error: java/lang/Object;I)V: defining a default interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: com.google.android.exoplayer2.Player$EventListener.onTimelineChanged : (Lcom/google/android/exoplayer2/Timeline;Ljava/lang/Object;I)V Readings4.Android C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common

Xamarin: @(Content) build action is not supported

百般思念 提交于 2019-12-12 18:31:47
问题 I'm developing a Android App in VS Pro 2015(Xamarin). Everything worked fine until this morning when I updated my Android device. I'm able to build my application but while deploying to my device I get a bunch of warnings that say @(Content) build action is not supported which other people seem to have fixed by setting the AndroidManifest.xml build action to None but my AndroidManifest.xml 's build action is already set to none. I have checked all the specified files in the warnings. Most of

How to set layout_weight programmatically?

[亡魂溺海] 提交于 2019-12-12 18:31:13
问题 Disclaimer: AFAIK This question has no answer so far for XAMARIN ANDROID . It has been answered multiple times for Android/Java. My problem is that I have no constructor overload for GridLayoutParams that takes the layout_weight as a parameter... The following is the XML I'm trying to replicate by code: android:layout_width="0sp" android:layout_height="wrap_content" android:layout_weight="1" Not setting layout_weight makes the control (a checkbox) simply invisible. Here is where I am with the

Error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'. (APT0000)

余生长醉 提交于 2019-12-12 18:28:08
问题 I am new to xamarin studio. I have added all the required packages corresponding to the target API 23 to my android xamarin studio project, set it to the right target API 23 but am still being haunted by these errors in the image below. Any help rendered will be greatly appreciated Image contains errors from an android xamarin studio project 回答1: Your compile SDK version must match the support library's major version. Since you are using support library v23, you need to compile against

Xamarin.UITest: How To Verify Placeholder/Hint Text

北战南征 提交于 2019-12-12 18:28:06
问题 I am writing a Xamarin.UITest for a cross-platform Xamarin.iOS and Xamarin.Android app. In my Xamarin.UITest, how do I verify the following properties: On Xamarin.Android, how can I verify the Hint property for an EditText ? On Xamarin.iOS, how can I verify the Placeholder property for a UITextField ? 回答1: Sample Code string GetPlaceholderText(string entryAutomationId) { if (app is AndroidApp) { return app.Query(x => x.Marked(entryAutomationId)?.Invoke("getHint"))?.FirstOrDefault()?.ToString(

Making mono cross platform support for Task/Intent

我的未来我决定 提交于 2019-12-12 18:27:35
问题 I have a application for WP7 and Android, and this application must have supporthas support for "any" connection type (WiFi, NFC, Bluetooth etc) I have then created a layered model with MVVMCross https://github.com/slodge/MvvmCross I have an interface for example Android Bluetooth must implement interface IConnectionService { List<TargetDevice> FindDevices(); void Connect(TargetDevice targetDevice); void Disconnect(); byte[] Read(); void Write(byte[] command); } I want to be able to request

Toolbar back click is not working in Xamarin android

我的梦境 提交于 2019-12-12 18:26:14
问题 I have Created Toolbar with back arrow, click is not working toolbar = FindViewById<Toolbar>(Resource.Id.toolbar2); toolbar.NavigationClick += Back; private void Back(object sender, Toolbar.NavigationClickEventArgs e) { Finish(); } 回答1: In your OnCreate method do this : ActionBar.SetHomeButtonEnabled(true); ActionBar.SetDisplayHomeAsUpEnabled(true); Then override the OnOptionsItemSelected method like this. public override bool OnOptionsItemSelected(IMenuItem item) { switch (item.ItemId) {

Custom Arrayadapter with Custom Filter

冷暖自知 提交于 2019-12-12 18:24:05
问题 I will give you a short review about what i'm trying to do: I want to fill the DropDown of a AutoCompleteTextView with my own Objects. those objects contain 3 Strings. In the list_item_view should be 2 of the strings. This List should be filterable. Now a bit of code, what i've done till now: My CustomAdapter looks like this: public class CustomerAdapter : ArrayAdapter<CustomerSingle>, IFilterable { private ws_test.Test ws=null; public static List<CustomerSingle> _contactList; private

How to get checked radio button and how to control only one radio button selected in list view

一个人想着一个人 提交于 2019-12-12 17:15:56
问题 I trying to add my data to a list view. I am using adapter on this. Inside the list view have radio button and some field. class StocktakeEditViewAdaptor : BaseAdapter<Model.FileRecord> { private Dictionary<int, bool> checkDictionary = new Dictionary<int, bool>(); public override View GetView(int position, View convertView, ViewGroup parent) { var item = items[position]; View view = convertView; //if (view == null) { view = context.LayoutInflater.Inflate(Resource.Layout