This is a migrated thread and some comments may be shown as answers.

Xamarin UI compiled with 25.3.1 android support libs?

16 Answers 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 2
Tim asked on 23 May 2017, 01:01 PM

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

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 23 May 2017, 09:36 PM
Hi Tim,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Tim
Top achievements
Rank 2
answered on 24 May 2017, 08:30 AM
Ok. Thanks!
0
Lindsay Miles
Top achievements
Rank 1
answered on 25 May 2017, 09:28 PM

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.

0
Tim
Top achievements
Rank 2
answered on 25 May 2017, 09:34 PM
Try enabling proguard and multidex, and then rebuild again. 
0
Lindsay Miles
Top achievements
Rank 1
answered on 25 May 2017, 09:41 PM

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... :)

0
Tim
Top achievements
Rank 2
answered on 26 May 2017, 08:13 AM

@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/

 

0
Lindsay Miles
Top achievements
Rank 1
answered on 26 May 2017, 12:05 PM

@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.

0
Namysław
Top achievements
Rank 1
answered on 14 Jul 2017, 10:32 AM
Any update on Telerik support for 25.3.1 android libraries? When?
On latest Telerik release, it's still not supported, and trying to update Xamarin.Android.* nugets causing app imposibility to be built.

Thanks
0
Lance | Manager Technical Support
Telerik team
answered on 14 Jul 2017, 02:42 PM
Hi Namyslaw,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Namysław
Top achievements
Rank 1
answered on 26 Jul 2017, 08:21 AM
Well, yes, I've "migrated" whole my solution from PCL to NETStandard, and then tried again to update Xamarin.Android libs to 25.3.1, and it works correctly.
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!
0
James
Top achievements
Rank 1
answered on 12 Feb 2018, 02:59 PM
Hi, was this ever finished? Im wondering because I am getting warnings in my projects.
0
Lance | Manager Technical Support
Telerik team
answered on 12 Feb 2018, 04:45 PM
Hi James,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 12 Feb 2018, 06:45 PM
Thanks for the speedy reply. Do you have any idea when those packages will be upgraded in Telerik? Or is there any way to suppress  the warnings? I have 1300 of them and they are a bit obnoxious.
0
Lance | Manager Technical Support
Telerik team
answered on 12 Feb 2018, 08:14 PM
Hello James,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 12 Feb 2018, 09:32 PM
As you can see in my screenshot, there is no code associated with the warnings I am getting, so adding the pragma does not work. Any other solutions?
0
Lance | Manager Technical Support
Telerik team
answered on 13 Feb 2018, 02:22 AM
Hello James,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Tim
Top achievements
Rank 2
Answers by
Lance | Manager Technical Support
Telerik team
Tim
Top achievements
Rank 2
Lindsay Miles
Top achievements
Rank 1
Namysław
Top achievements
Rank 1
James
Top achievements
Rank 1
Share this question
or