xamarin.android

Microsoft.Threading.Tasks.Extensions in Xamarin Mono projects

亡梦爱人 提交于 2020-01-11 11:53:55
问题 I have built a NuGet package for my Simple.OData.Client with support for Xamarin Android and iOS. This library uses Microsoft.Bcl.Async. Tests using Android and iOS simulator went OK, but when I install this new NuGet package into another project, it fails to compile Droid/Touch projects with the following message: C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(720,2): error : Exception while loading assemblies: System.IO.FileNotFoundException: Could not load

Is Java 8 features available for Xamarin.Android in Java binding project?

夙愿已清 提交于 2020-01-11 08:52:09
问题 I have an android library project that uses Java 8 features, i.e. via compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } When binding the output AAR to Xamarin.Android, the binding project compiles fine. However, when trying to use the binding project in a Xamarin.Android application project, I am getting the following error: 2>COMPILETODALVIK : Uncaught translation error : com.android.dx.cf.code.SimException: invalid opcode ba

Adding dotnet highcharts to Xamarin app

孤街浪徒 提交于 2020-01-11 07:55:13
问题 I want to add highcharts library to my xamarin app. Does xamarin support it or not. I don't want to use oxyplot as i have already worked with highcharts in my web application Any help would be highly appreciated 回答1: If your app isn't a hybrid-app than the answer is no. The reason for this is that HighCharts are JavaScript-based charts for the web. If you want fully native charts and don't want to use oxyplot take a look at ShinobiControls. 回答2: It's actually pretty simple. Put together an

Controls showing in designer but not in emulator

半城伤御伤魂 提交于 2020-01-11 07:20:45
问题 This is my first Xamarin app. I have my environment set up in Visual Studio, and have a template project which I can run in the Android emulator. Having dragged and dropped a couple of controls on to the designer surface, I find that when I run the application in the emulator, neither of the two controls that I have added (a button and a switch) display in the emulator. I have tried: Cleaning the solution Rebuilding the solution Manually deleting bin and object files Unchecking 'Use Fast

Android only allows one navigation page on screen at a time using

十年热恋 提交于 2020-01-11 04:42:07
问题 what is the difference between 2 implementations below? public App() { // The root page of your application MainPage = new Views.MainPage(); } public App() { MainPage = new NavigationPage(new MainPage()); } if my main page inherits MasterDetailPage, 1st code above will work but 2nd one will return error message telling me that "android only allows one navigation page on screen at a time" when I debug my android app. public class MainPage : MasterDetailPage { MasterPage masterPage; public

Mono for Android, code obfuscation

徘徊边缘 提交于 2020-01-10 19:43:26
问题 As everybody knows, piracy becomes a very serious issue on Android. Does Mono for Android provide code obfuscation when compiling to native code? 回答1: Mono for Android does not provide this functionality, however you can still use a third-party tool for obfuscation. As Mono for Android produces CIL assemblies that are JITed by the Mono runtime on the Android device you need to obfuscate these .NET assemblies. Therefore tools like the Android obfuscator Proguard will not help you. The below

Xamarin Forms: Write a file in Android device's internal storage

你说的曾经没有我的故事 提交于 2020-01-10 05:53:12
问题 I am developing a cross-platform app using Xamarin Forms PCL project. In this I need to write a file in Android's internal storage so that I can access it. I have given Write to External Storage permissions but when I try to write the file it says Access is denied. Here is what I tried: Java.IO.File DataDirectoryPath = Android.OS.Environment.DataDirectory; string dirPath = DataDirectoryPath.AbsolutePath + "/MyFolder"; bool exists = Directory.Exists(dirPath); string filepath = dirPath + "/test

Xamarin Forms: Write a file in Android device's internal storage

为君一笑 提交于 2020-01-10 05:53:04
问题 I am developing a cross-platform app using Xamarin Forms PCL project. In this I need to write a file in Android's internal storage so that I can access it. I have given Write to External Storage permissions but when I try to write the file it says Access is denied. Here is what I tried: Java.IO.File DataDirectoryPath = Android.OS.Environment.DataDirectory; string dirPath = DataDirectoryPath.AbsolutePath + "/MyFolder"; bool exists = Directory.Exists(dirPath); string filepath = dirPath + "/test

Xamarin - Updating nuget packages caused errors

╄→尐↘猪︶ㄣ 提交于 2020-01-10 05:17:05
问题 I created a "Cross-Platform App (Xamarin.Forms)" app, and i immediately went and update the nuget packages (this is what i was told to do). Then i tried to built it, and not only I got several errors(see bellow) that were about the updated packages, I had code errors as well. I swear the God that i didn't touch the code of the project at all, and here is what I get: I googled, but i couldn't find out a clean solution for this. I am just one step before quitting this (unprofessional) product,

how to bind an image src to resource drawable image with Mvvmcross?

狂风中的少年 提交于 2020-01-10 04:52:15
问题 I'm trying to bind an image's src. I have tried using MvxHttpImageView like this <Mvx.MvxHttpImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/iconeView" local:MvxBind="{'ImageUrl':{'Path':'ImgSrc'}}" /> with public string ImgSrc { get {return "@res/drawable/icon.png"; } } I have tried several other ImgSrc and still don't have any result. icon.png is in my Resources/Drawable directory and is an AndroidResource any help will be great ! Thanks