Hi,
I'm now using 25.3.1 android support libraries and I'm getting a lot of XA0106 warnings. See this thread for clarification: https://forums.xamarin.com/discussion/89661/a-lot-of-warnings-appear-in-a-new-empty-xamarin-forms-xaml-project
Can you provide the Xamarin UI nugets compiled with 25.3.1 android support libraries? Perhaps in a different feed?
Thanks,
Tim
16 Answers, 1 is accepted
UI for Xamarin Cross Platform (Xamarin.Forms) supports SDK 23 (23.3.0) at this time (see here for required android dependencies). We are working on adding support for SDK 25 and we're planning it to be available in the next UI for Xamarin update.
Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
Wondering if this is related...
Download the latest UI for Xamarin trial today for VS 2017 for Mac.
Xamarin.Forms Shared project targeting iOS and Android.
Prior to adding UI for Xamarin, all compiling and running thus far. Only looking to use the RadListView.
Once the packages are added to the iOS and Android projects, iOS compiles without issue.
The Android project fails with these errors:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error MSB6006: "java" exited with code 2. (MSB6006) (mycompany.Droid)
AND
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2021,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Collections" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Threading.Tasks" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Diagnostics.Debug" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Threading" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.IO" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.ObjectModel" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.Extensions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.RegularExpressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Dynamic.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Reflection" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Xml.ReaderWriter" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.Encoding" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Globalization" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Linq.Expressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /></dependentAssembly></assemblyBinding>
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1965,3): error MSB6006: "java" exited with code 2.
Thanks Tim, that worked!
No compile/build error, still a lot of warnings a la your first post (XA0106)
What does proguard and multidex do? Excuse my ignorance... :)
@lindsay Check this out: https://www.bignerdranch.com/blog/i-like-big-apps-and-i-cannot-lie-using-proguard-to-avoid-the-dalvik-method-limit/
@Tim, all I can say is wow! I'd not have gotten to that in 100 years...!
thanks for THAT tip, it'll prove most useful in many projects I'm sure.
On latest Telerik release, it's still not supported, and trying to update Xamarin.Android.* nugets causing app imposibility to be built.
Thanks
You should be able to build using SDK 25 support libraries, please see Tsyvatko's reply here. If you continue to have problems, open a Support Ticket here and we'll assist further.
Please include as much information as possible in your ticket, such as:
- A list of the project's NuGet dependencies (and versions)
- What is your Android project's "Min", "Target" and "Compile With" version are set to
- What version of UI for Xamarin are you using
- What Android SDKs do you have installed (take a screenshot of your Android SDK Manager like you see Tsyvatko's forum post)
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Can't remember the exact issue before, but it was something with mentioned previously **"java" exited with code 2**.
Now, it's building and working correctly with Telerik dlls.
Thank you!
Those warnings about drawables are due to your project referencing 25.x Xamarin.Support.Android package versions. You'll see the warnings when using support packages greater than 23.3, but UI for Xamarin will still work as expected when using 25.3.x and 25.4.x packages.
If you'd like to know when we do change the minimum support libraries version, we will announce such a change in the release notes. You can find the UI for Xamarin release note here.
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
We do understand the amount of information pumped to the output during a build can be overwhelming, thus the dev team is aware of this and is considering ways to address it with out negatively affecting min version or other side effects.
I don't have an ETA on when this would be or what changes would be required. In the meantime, you can suppress by using a pragma warning disable using the warning's number. Here's a generic C# article explaining the approach.
I'm guessing you're seeing the XA0106 warning, so you could try the following pragma disable above the namespace in your Android project's MainActivity.cs
using
Android.App;
using
Android.Content.PM;
using
Android.OS;
using
Xamarin.Forms;
using
Xamarin.Forms.Platform.Android;
#pragma warning disable 0106
namespace
ArtGalleryCRM.Droid
{
[Activity(Label =
"@string/app_name"
, Theme =
"@style/MyTheme"
, MainLauncher =
true
, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public
class
MainActivity : FormsAppCompatActivity
{
protected
override
void
OnCreate (Bundle bundle)
{
....
}
}
}
But I must warn you that this could suppress other 0106 warnings that might be important, use your best judgement based on what your other dependencies are.
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
You can try it in the project's settings, see this Visual Studio documentation for the steps, but this doesn't always work.
If you open a support ticket here and include the following information, I'll inform the dev team so they can look into this further.
- A copy of a few of the warning lines (ones specific to UI for Xamarin, there are others that are shown for using Xamarin.Forms targeting Oreo)
- What is your "Compile using Android Version (Target Framework)" (this is found on the Properties > Application tab)
- What is the "Minimum Android version" and "Target Android version" (found on the Properties > Android Manifest tab)
- The version of Xamarin.Forms you're using
- The version of UI for Xamarin you're using
- A list of the NuGet packages you're using (they usually also contribute to the SDK level warnings)
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik