I'm trying to add some xamarin android related nuget packages into my project.
When I see https://www.nuget.org/packages/Xamarin.Forms/3.1.0.583944
Dependencies
MonoAndroid 7.1
Tizen 4.0
UAP 10.0
Does MonoAndroid 7.1 mean that I can only use Android 7.1 as my compiling version? What if I use Android 8 which is MonoAndroid 8.0 ?
Using MonoAndroid 8.0 should be fine. Consider it more of a minimum required version number. Also, a word to the wise, make sure that all projects in the solution are using the same Xamarin Forms version. It will save you headaches.
Related
I have to develop an app for a device on gingerbread version (9-10) of Android.
Android studio don't allow to have a minSDK less than version 14.
Is there a solution to develop and build an app for gingerbread version ?
Thanks.
Use Android Studio 2.3.3 (the oldest version). You'll find API-9 the minimum SDK.
I have a C# Xamarin Forms Solution in Visual Studio 2019 that was created from the Xamarin Forms Template.
When the Android version (Target Framework), (found in the 'Application' Tab of the properties Window of the Android project) is set to either
1) Android 8.1 (Oreo)
2) Android 9.0 (Pie)
then my app works great on a phone running Android 9.0
However, as soon as I change it to 'Android 8.0 (Oreo)' then Visual Studio generates errors and warnings. Here is an image of them:
The reason I think I need to change the Android version to 8.0 is so that I can use the app on Android phones with this version. When I try to install the APK file (built targeting either 8.1 or 9.0) on an 8.0 Android device then the app does not work.
The error suggestion to "..increase the $(TargetFrameworkVersion)..." seems odd considering I am trying to target a lower version.
I should point out that I have all the Android SDK's installed for 8.0/8.1/9.0 and all the Android SDK Build Tools.
What am I doing wrong? I am wanting to target Android 8.0 (Oreo).
I am very new to Xamarin.
You only need to change the Minimum Android Version to run on lower API versions. Make Target Android version higher (to version 9) and Minimum Android Version to a version which you would like to support (maybe version 6). Also note that if you have any android support libraries or Xamarin.Forms, those also have a minimum build version. You have to target equal or higher version to build with those. Another thing you have to check is Supported Architectures (Properties-> Android Options -> Advanced -> Supported Architectures). Make sure it checked the architecture of the device that you try to deploy
I'm trying to create a Android project with MvvmCross.
But I'm trying to target MonoDroid 8.0 which is API-26 Android Oreo 8.0. Cause my test device is this and cannot be upgraded to 8.1.
But when trying to install any Mvvmcross.Droid package I get a
Package MvvmCross.Droid.Support.Design 6.0.1 is not compatible with
monoandroid80 (MonoAndroid,Version=v8.0)
Does that mean if I'm trying to target any older version other than 8.1 I cannot use Mvvmcross 6.0 and have to use older versions of Mvvmcross?
If anybody else if facing a similar problem.
Note : MVVMCross 6 targets minimum MonoDroid 8.1 which is API 27 and you need to install them in order for the app to compile and run on any versions of Android.
So solved this by installing the API 27 sdk and making sure the Target Version is set to API 27 or 8.1 version.
https://github.com/alexsorokoletov/Xamarin.Android.Maps.Utils
I am trying to use that nuget for my xamarin forms android map. However it depends on Google.Play.Services.Maps to be version 32.961 or higher but my current version is 29.0 and when I try to update it I need to update lots of packages (Support.Design, Support.v4 etc) and visual studio is not letting me update that either. I believe it's something about the MonoAndroid version. I get this error message You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework.
Any ideas how I can successfully install this nuget?
Xamarin Forms changed the way it depends on the Android support libraries a few versions ago.
You can see in the NuGet package (I have 2.3.4.247 installed) that MonoAndroid v1.0 requires Android support libraries to be equal to 23.3.0, but MonoAndroid v7.0 requires the version to be greater than or equal to 23.3.0.
To update the Android support libraries you need to ensure you have the latest Android SDK installed in the Android SDK manager, then change the Compile using Android Version (Target Framework) on the Application tab of the project options to be Use Latest Platform, and the Target Android Version on the Android Manifest tab to be Use Compile using SDK version.
Once you have done this you should be able to update the support libraries. I did that by selecting Xamarin.Android.Support.v4 and updating in NuGet.
I have recently updated my phonegao version to 3.3.0 and when I create and build a new project with Phonegap in Android the project builds using my highest Android SDK version (Android 4.4 - API 19 in my case), but I want to build my phonegap 3.3 projects using Android 4.4.2 version (API 17).
Any ideas about how to perform this action?
Thanks a lot in advance!
So you do not want API 19 in your project, It means you want your project to run upto android version 4.2.2 only.
Make following changes in your config.xml
<preference name= "android-minSdkVersion" value="7"/>
if you want restriction on versions then you can include target version as
targetSdkVersion="17"
if you dont include target version then there will be no restrictions.