When I try to update the NuGet packages for my solution, I get a set of errors as follows and however methods I tried, did not resolve the problem. Can someone please explain me and help me resolve this problem? Thank you in advance.
The error message explains the problem. The latest version of the support library is 25.3.1 which is Android 7. Your project targets Android 6. So either change your project's target (in Project Options|General|Target framework) to 7 (or 7.1) or use version 23 of the support library.
As #daramasala said in the reply, "latest version of the support library is 25.3.1 which is Android 7". In my project, the Target Android Version was already set to 7, but then I set the Compile using Android version to Android 7 as well, and after that, I could update the NuGet packages without an issue.
You can set the Target Android Version, Compile using Android version as well as the Minimum Android version by going to project Properties from the Application section....
Related
We have a Xamarin.Forms application which uses quite a few packages.
When building, we're getting hundreds of XA0106 warnings like this one:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Warning XA0106: Skipping Musterd.Droid.Resource.Attribute.MediaRouteControllerWindowBackground. Please check that your Nuget Package versions are compatible. (XA0106) (Musterd.Droid)
I know that this is because of mismatches between support libraries used by packages. The problem is finding out which one(s)!
Is there any tool or build setting I can use which will help me home on which packages are causing this and so which I can/should update?
This can happen when the version of the Android SDK you are using is different to the version of the Android support packages used by your app. The support packages are versioned in a way that should match the compile time Android SDK.
The best fix is to always use the latest of both.
Update your Android SDK to have the latest stable installed.
Make sure your app compiles against the latest version in the project settings.
In the Android project update all NuGet Packages that start with Xamarin.Android to the latest 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.
Today I did update Android Studio to 2.0. And I faced with the problem:
There weren't any problems with 1.5, but now there are. I'm using sockeqwe/fragmentargs library to communicate between fragments using FragmentBuilder.
I have the latest version in gradle:
compile 'com.hannesdorfmann.fragmentargs:annotation:3.0.2'
apt 'com.hannesdorfmann.fragmentargs:processor:3.0.2'
Also, I did update for gradle to 2.0.0.
Any suggestions ?
Go to SDK Manager download and install all on SDK Platforms and SDK Tools this will solve your issue.
I don't know how, but this problem is connected with Instant Run functionality. I disabled it and all are working fine.
With the release of Android Studio 1.0 (AS) i want to migrate from Eclipse. Generally I need no other library then libpd (PureData) for Audio synthesis. The Problem is, that libpd for android is geared to the needs of Eclipse. So in Eclipse everything is working as expected.
The only information I could found was that: Using libpd in Android Studio So I know libpd and Android Studio could work together but here are maybe some other problems.
I started to generate a new simple project (MinSDK 10 - CompileSDK 21 - BuildTools 21.1.2) just with a blank activity. I can deploy this simple app to my Nexus and everything is fine.
Then I import :PDCore and :AndroidMidi as Module into my AS project and I get the Gradle build-error: Error:The SDK Build Tools revision (17.0.0) is too low for project ':PdCore'. Minimum required is 19.1.0
I installed API 19 and Build Tools version 19.1 via the SDK Manager but that's not solving my problem.
I changed the buildToolsVersion of the apps build.gradle file to "19.1.0" but that's not solving my problem.
Any advices to get Gradle working probably?
Maybe anyone got a sample Android Studio project with libpd to share?
Thanks in advance!
FYI: I wrote some posts regarding migrating to Android Studio using libpd. Take a look here:
http://www.journal.deviantdev.com/using-libpd-with-android-studio/
http://www.journal.deviantdev.com/update-using-libpd-with-android-studio/
http://www.journal.deviantdev.com/sample-libpd-android-studio/
You have to change the build.gradle of the :PDCore and :AndroidMidi modules. At the moment they are using 17, update the BuildTools to the newest version (21.1.2). This should solve your problem.
I created a fork of the libpd-for-android and migrated it to Android Studio. You can clone it and open it in Android Studio as a 'Non Android Studio Project'. This worked very nicely for me and you can also now created an .aar file and use it in your Android App ( instead of copying the whole code or using git submodules):
https://github.com/tkirshboim/pd-for-android
after I updated Android SDK Tools and ADT to 22.6, I found a error in android-support-v7-appcompat(I created a project for Androidsupport class):
android-support-v7-appcompat] Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 16
So I am wondering how to fix it and will it affect projects which use the support class before the update.
thx
Import this library from you Android ADT Bundle.
/Eclipse Android/adt-bundle-mac-x86_64-20140321/sdk/extras/android/support/v7
Use this library in the Android Project. The issue will be FIX.
Note : You need to locate your V7 library from your Android ADT
Hope this helps