Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Issues and warnings with Xamarin.Forms/Xamarin.Android

$
0
0

Problem recreation steps below, issues in bold:
Created a Blank App, PCL, .Net Framework 4.6.1 - called it HelloWorld

Dev environment:
Visual Studio Community 2017 version 15.2 (26430.13) Release
Xamarin 4.5.0.486
Xamarin Android SDK 7.3.1.2
Xamarin iOs 10.10.0.37

1 Warning on Error List:

Severity Code Description Project File Line Suppression State
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. HelloWorld.Android 1 Active

Simulated on Android [Android Google x86, 7.0 API 24] – PASS
Simulated on iOS [iphone 6 iOS 10.3] – PASS, however when Build stopped - there is an error in Error List.

Severity Code Description Project File Line Suppression State
Error An error occurred while executing MTouch 0

CHANGED THE TARGET FRAMEWORK FOR ANDROID

Android Properties:
Change the ‘Compile using Android Version: (Target Framework)

From ‘Use Latest Platform (Android 7.1 Nougat)’
To ‘Android 7.0 (Nougat)’

4 Warnings, including one above:

Severity Description Project File
Warning The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v7.0). You need to increase the $(TargetFrameworkVersion) for your project. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\HelloWorld.Android.csproj

Warning The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v7.0). You need to increase the $(TargetFrameworkVersion) for your project. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\HelloWorld.Android.csproj

Warning The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v7.0). You need to increase the $(TargetFrameworkVersion) for your project. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\HelloWorld.Android.csproj

No reference of TargetFrameworkVerion of 7.1 anywhere in csproj files, only found:

<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>

Simulated on Android [Android Google x86, 7.0 API 24] – PASS
Simulated on iOS [iphone 6 iOS 10.3] – PASS, however when Build stopped – there is an error in Error List.

Severity Code Description Project File Line Suppression State
Error An error occurred while executing MTouch 0

UPDATED NUGET PACKAGES FOR ALL PACKAGES IN SOLUTION

Available updates:

Updating fails with an issue:

The package at ‘D:\Visual Studio 2017\Projects\HelloWorld\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0’ failed to uninstall. Restart Visual Studio to finish the process.

Restarted Visual Studio 2017, and opened Nuget Package Manager/Updates

One package available to Update:

Updating fails with an issue similar to earlier:

The package at ‘D:\Visual Studio 2017\Projects\HelloWorld\packages\Xamarin.Build.Download.0.4.3‘ failed to uninstall. Restart Visual Studio to finish the process.

Restarted Visual Studio, no more updates available via Nuget.

Error List now shows multiple Warnings:

Severity Description Project File Line

Warning Attribute "expandedTitleGravity" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "tabMode" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "fabSize" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "layout_anchorGravity" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Error: String types not allowed (at 'fabSize' with value 'auto'). HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "layout_scrollFlags" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "tabGravity" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "layout_collapseMode" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "collapsedTitleGravity" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res\values\values.xml 2

Warning Attribute "showDividers" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values\values.xml 2

Warning Attribute "showAsAction" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values\values.xml 2

Warning Attribute "actionBarSize" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values\values.xml 2

Warning Attribute "navigationMode" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values\values.xml 2

Warning Attribute "backgroundTintMode" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values\values.xml 2

Warning Attribute "buttonTintMode" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values\values.xml 2

Warning Attribute "displayOptions" already defined with incompatible format. HelloWorld.Android D:\Visual Studio 2017\Projects\HelloWorld\HelloWorld\HelloWorld.Android\obj\Debug__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values\values.xml 2

Simulated on Android [Android Google x86, 7.0 API 24] – PASS
Simulated on iOS [iphone 6 iOS 10.3] – PASS, however when Build stopped - there is an error in Error List.

CLEAN SOLUTION AND BUILD SOLUTION
The issues with values.xml seem to have gone, but the issues with the TargetFramework are now back.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>